Why does tan 45(0.7853981633974483 in radian) give me 0.9999? What\'s wrong with the following code?
tan 45
0.9999
System.out.println(Math.tan(M
That's probably because tan(45) is 1, and the rest is a rounding error. Floating point calculations are highly unlikely to give you accurate results, due to how floating point calculations work.
tan(45)