+ 1
I can't understand, why do sin(x) and tan(x) return wrong values when I put Math.PI as x. It shows 1,22 for sin and -1,22 for tan, when it should be 0 in both cases?
3 Respostas
+ 2
By default x is not in degree mode its in radians, and returning radians value
0
Ankush +1.
Always pay attention either radians or degrees are used in math function.
0
Well the value is 1.22×10^(-16) and its pretty close to zero actually. Even though it should return exactly zero, i dont know why it is returning a number tending to zero