Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "math"
  6. )
  7.  
  8. func main() {
  9. incx := 0.01
  10. incy := 0.1
  11. for x := 0.0; x < math.Pi/2.0; x+=incx {
  12. for y := 0.0; y < 10.0; y+=incy {
  13. z := math.Sin(x) - y*math.Cos(x)
  14. r := math.Sqrt(1 + math.Pow(y, 2))
  15. q := math.Acos(1/r)
  16. x2 := math.Asin(z/r) + q
  17. if x - x2 > 0.0001 {
  18. fmt.Println(x, x2)
  19. }
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement