python怎么算反三角函数_python弧度制转换 三角函数 反三角函数 双曲 反双曲 sin cos tan asin acos atan asinh acosh atanh atanh2...

前提:import math

函数介绍:

degrees(x)将x从弧度转换为度数。

radians(x)将x从度数转换为弧度。

例如:

>>> import math

>>> math.degrees(math.pi/2)

90.0

>>> math.radians(90)

1.5707963267948966

>>> math.pi/2

1.5707963267948966

sin(x)返回x的正弦值(以弧度表示)。

sinh(x)返回x的双曲正弦。

asin(x)返回x的反正弦(以弧度表示)。

asinh(x)返回x的反双曲正弦值。

例如:

>>> import math

>>> math.pi

3.141592653589793

>>> x=math.pi/2

>>> math.sin(x)

1.0

>>> math.sinh(x)

2.3012989023072947

>>> math.asin(0)

0.0

>>> math.asin(1)

1.5707963267948966

>>> math.asinh(1)

0.8813735870195429

cos(x)返回x的余弦值(以弧度表示)。

cosh(x)返回x的双曲余弦值。

acos(x)返回x的反余弦(以弧度表示)。

acosh(x)返回x的反双曲余弦值。

例如:

>>> import math

>>> x=math.pi/2

>>> math.cos(x)

6.123233995736766e-17

>>> math.cosh(x)

2.5091784786580567

>>> math.acos(x)

>>> math.acos(0)

1.5707963267948966

>>> math.acosh(1)

0.0

tan(x)返回x的正切(以弧度表示)。

tanh(x)返回x的双曲正切值。

atan(x)返回x的反正切(以弧度表示)。

atan2(y,x)返回y / x的反正切(以弧度表示)。与atan(y / x)不同,考虑x和y的符号。

atanh(x)返回x的反双曲正切。

例如:

>>> import math

>>> x=math.pi/2

>>> math.tan(x)

1.633123935319537e+16

>>> math.tanh(x)

0.9171523356672744

>>> math.atan(0)

0.0

>>> math.atanh(0.5)

0.5493061443340549

>>> math.atan2(-1,2)

-0.4636476090008061

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值