Jus*_*tin 2 trigonometry function go
我试图在golang中使用来自math API的cos函数,但由于某种原因,该函数返回的值不正确.这个问题有一个已知的解决方案吗?
码:
fmt.Println("cos(pi/2):", math.Cos(math.Pi / 2))
fmt.Println("sen(pi/2):", math.Sin(math.Pi / 2))
Run Code Online (Sandbox Code Playgroud)
输出:
cos(pi/2):6.123233995736757e-17
森(pi/2):1