关于浮点数运算
想准确的浮点数运算,是引入decimal,可是为什么我计算的还是有问题?是我代码错误吗? Decimal中要写入字符串形式x=decimal.Decimal('0.1') Decimal() 中要写字符串,不是浮点数
x = decimal.Decimal('0.1')
y = decimal.Decimal('0.2') BngThea 发表于 2020-4-15 20:08
Decimal中要写入字符串形式
x=decimal.Decimal('0.1')
原来是这样,日常学习get
页:
[1]