
July 21st, 2008, 01:31 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Financial Calculations in Ada
>An interest rate isn't an amount of money, so don't use type Money to
>represent it.
"delta 0.01" is good for display. It also works if you only add,
subtract, and multiply by integers. your arithmetic goes beyond
that, precision and rounding become a policy decision. For instance,
at a rate of 7.125% is the total interest, rounded to pennies,
on three $50 loans .07125*50 = 3.5625, 3.56 * 3 = $10.68
is it 3*3.5625 = 10.6875, rounded to $10.69?
|