- math.pi
数学常数π= 3.141592……
- math.e
数学常数e = 2.718281….
- math.tau
数学常数τ= 6.283185……
- math.ceil(x)
返回x的上限,返回最小的整数A (A>=x)。如math.ceil(3.14)返回的整数为4官网math库
- math.fabs(x)
返回绝对值x。
- math.factorial(x)
返回 x!。如果x不是积分或者是负的,就会产生ValueError。
- math.floor(x)
返回x的下限,返回一个值最大整数A (A<=x)。如math.floor(3.14)返回的整数为3
-
math.exp(x)
返回 ex也就是 math.e**x
-
math . pow(x,y)
- math.sqrt(x)
返回√x
- math.degrees(x)
将角x从弧度转换成角度。
- math.radians(x)
把角x从度转换成弧度。
- math.acos(x)
返回 x 的反余弦
- math.asin(x)
返回 x 的反正弦。
- math.atan(x)
返回 x 的反正切。
- math.cos(x)
返回 x 的余弦。
- math.sin(x)
返回 x 的正弦。
- math.tan(x)
返回 x 的正切。
- math.log(x,a)
python官网math库链接