'{:.ne}'.format()科学计数法如未指定精度n,则用小数点之后 '{:.n%}'.format()取百分比n指定精度。 math.ceil()向上取整ceil:在英文中,有「天花板」的意思,在上面,所以,此函数是向上取整。 math.floor()向下取整同样,floor在英文中有地板的意思,在下面,所以,此函数是向下取整。 round()四舍五入![]() math.modf()取小数、取整数部分![]() int()取整数![]() math.fabs()取绝对值![]() math.gcd()取两个数最大公约数![]() math.sqrt()开平方![]() math.pi取圆周率派![]() math.e取常数e![]() math.exp()取e的n次方![]() math.pow(x, y)取x的y次方![]() math.log2()取以2为底的对数![]() math.log10()取以10为底的对数![]() math.log(x, y)![]() 三角函数
反三角函数
双曲函数
cmath操作复数Referencehttps://docs./zh-cn/3/library/string.html#format-specification-mini-language |
|