整数

+ - * / 加减乘除

浮点数

因为python使用的是IEEE754标准储存浮点数,故有误差,计算时需要引入decimal模块

1
2
import decimal
decimal.Decimal