Floating point inaccuracy again.
Decimal(number)
doesn't change a thing: the value is modified before it hits Decimal
.
You can avoid that by passing strings to Decimal
, though:
Decimal("4321.90") * Decimal("100")
result:
Decimal('432190.00')
(so Decimal
handles the floating point numbers without using the floating point registers & operations at all)