>>> x = Decimal(1000)
>>> y = Decimal(.005)
>>> x * y
Decimal('5.000000000000000104083408559')
I expected the result to be just 5
>>> a = 1000
>>> b = .005
>>> a * b
5.0
Above is what I expected.
====
The original intention is to divide a DecimalField
from Django. Should I convert the Decimal
value to float
instead? For me to expect accurate resuls?