标签: java
我写了这样一个程序:
double degrees = 45.0; double radians = Math.toRadians(degrees); System.out.println(Math.tan(radians));
当我运行此代码时,我得到的结果是0.9999999999999 有没有办法在java中计算正确的tan函数?你能帮助我吗。谢谢!