小编use*_*592的帖子

在python中反转Tan(tan-1)

我试图计算python中tan的倒数,但它没有给我正确的值,例如,如果我要做反向tan为1.18, math.atan(1.18)

>>>math.atan(1.18)
0.8677
Run Code Online (Sandbox Code Playgroud)

但是,正确答案是49.720136931.做的正确方法是什么?

python math trigonometry

26
推荐指数
3
解决办法
6万
查看次数

用Python计算对数

我试图使用python的数学模块计算对数(math.log(x,[base]),但是当我使用float(raw_input)x和base值时,它会给我错误,ZeroDivisionError: float division by zero.

x = 9.0
base = 3.0
Run Code Online (Sandbox Code Playgroud)

python logarithm

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

python ×2

logarithm ×1

math ×1

trigonometry ×1