如未指定精度n,则用小数点之后 6
位精度。
n指定精度。
ceil:在英文中,有「天花板」的意思,在上面,所以,此函数是向上取整。
同样,floor在英文中有地板的意思,在下面,所以,此函数是向下取整。
math.sin()取正弦值
math.cos()取余弦值
math.tan()取正切值
math.acos()取反余弦值
math.asin()取反正弦值
math.atan()取反正切值
math.cosh()取双曲余弦值
math.sinh()取双曲正弦值
math.tanh()取双曲正切值
math.acosh()取反双曲余弦值
math.asinh()取反双曲正弦值
math.atanh()取反双曲正切值
https://docs.python.org/zh-cn/3/library/string.html#format-specification-mini-language
https://docs.python.org/zh-cn/3/library/math.html?highlight=math#module-math
https://docs.python.org/zh-cn/3/library/cmath.html?highlight=math#module-cmath
联系客服