Patricia Shanahan said:
I am curious about why you expect this to be more precise than: "The
computed result must be within 1 ulp of the exact result. ..."
Well, one ulp of i/100 is likely smaller than one ulp of 1+i/100
(at least it is for 0 <= i <= 100, the typical range for interest
rates). It's like calculating sin(0.0) versus sin(Math.PI), where
sin() makes the same promise wrt precision up to an ulp.
If the OP had been interested in the interest value alone, i.e. in
I = L*( (1+i/100)^n ) - L
then using log1p() and expm1() probably would beat the precision of
pow() by, um, a few decimal digits, depending of course on the values
of i and n.
Anyway, I think it's good to know that log1p() and expm1() exist,
even if the example at hand doesn't now seem to cry out for them
as loudly as I thought it did on first read.