python中Tan的逆(tan-1) [英] Inverse of Tan in python (tan-1)
本文介绍了python中Tan的逆(tan-1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在python中计算tan的倒数,但是它不能给我正确的值,例如,如果我要进行1.18的倒数tan,math.atan(1.18)
I am trying to calculate the inverse of tan in python, but it does not give me the correct value, for example, if I were to do the inverse tan of 1.18, math.atan(1.18)
>>>math.atan(1.18)
0.8677
但是,正确答案是49.720136931.正确的方法是什么?
However, the correct answer is 49.720136931. What is the correct way to do than?
推荐答案
math.atan(x)
以弧度返回,如果需要学位,请使用 math.degrees(x)
Converts angle x from radians to degrees.
>>> import math
>>> math.degrees(math.atan(1.18))
49.720136931043555
这篇关于python中Tan的逆(tan-1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文