0

I write a program like this:

double degrees = 45.0;
double radians = Math.toRadians(degrees);
System.out.println(Math.tan(radians));

When I run this code I get the result is 0.9999999999999 Is there a way to calculate the correct tan function in java? Can you help me. Thank you!

Robotic Vn
  • 437
  • 2
  • 7
  • 20

0 Answers0