python math模块的拆分函数

math有两个拆分函数
1.math.modf(numble) #将一个数的小数部分与整数部分拆开,如果numble是一个整数也没关系
2.math.copysign(numble_1,numble_2) #将numble_2的正负号放在numble_1前面,然后输出numble_1

在这里插入图片描述

原创文章 382 获赞 114 访问量 3万+

猜你喜欢

转载自blog.csdn.net/weixin_45949073/article/details/105785072
今日推荐