this is a common approach when you are dealing in rates less than .01 -- you just need to be sure you are rounding correctly
>>> from decimal import Decimal
>>> Decimal(1000) * Decimal(16) / Decimal(31)
Decimal('516.1290322580645161290322581')
>>> 1000 * 16 / 31
516.1290322580645
The point is using Decimal allows control over precision and rounding rather than accepting ad-hoc approximations of a float.