Numerical Computing with IEEE Floating Point Arithmetic

We illustrate these concepts by considering algorithms for computing compound interest. Suppose we invest a 0 dollars in a bank that pays 5% interest per year, compounded quarterly. This means that at the end of the first quarter of the year, the value of our investment is
dollars, i.e., the original amount plus one quarter of 5% of the original amount. At the end of the second quarter, the bank pays interest not only on the original amount a 0, but also on the interest earned in the first quarter; thus, the value of the investment at the end of the second quarter is
dollars. At the end of the third quarter the bank pays interest on this amount, so that the investment is now worth
and at the end of the whole year the bank pays the last installment of interest on the amount a 3, so that the investment is finally worth
In general, if a 0 dollars are invested at an interest rate x with compounding n times per year, at the end of the year the final value is
dollars, where
This is the compound interest formula. It is well known that, for fixed x, the compound interest formula C n( x) has a limiting value as n ? ?, namely, exp( x), as already displayed in (10.1). Consequently, excessively high compounding frequencies are pointless.
Nonetheless, it is interesting to evaluate C