Normal floating-point data representations work well for most situations. In the case of financial operations, however, extreme precision is required. As an example, take the subject of currency conversion. If a customer is transferring money between United States Dollars(USD) and Indian Rupees (INR), for example, adding precision produces radically different results as the sums of money exchanged increase.Â
Here is an example. For the sake of argument, let's say that the actual exchange rate between USD and INR is the following:
ACTUAL: 1 USD = 70.64954999 INR
However, if the program application only extends precision to 4 decimal places, the rounded rate used might be this:
ROUNDED: 1 USD = 70.6495
The difference when transferring 1,000,000 USD starts to become significant:
Actual: 70649549.99
Rounded: 70649500.00
Even in the case of small amounts being exchanged, over time the differences could start to add up to significant amounts. Also...