标签:info image math http nbsp python 技术 导入 取整
1. 精确计算
python的float型不精确,需要导入decimal包,以下是不精确举例:
导入decimal包后:
2. 向上取整
一般的取整数(向下取整):
向上取整的方法:
python 精确计算与向上取整 decimal math.ceil
标签:info image math http nbsp python 技术 导入 取整
原文地址:https://www.cnblogs.com/cxhzy/p/9787071.html