I am studying theorem 4 in this article (its proof is under theorem 13). From what I have learned, the theorem is helpful when $x$ is small but $1 \oplus x \neq 1$. At the end of theorem 4, it discussed idea of benign cancellation as follow:
The results of this section can be summarized by saying that a guard digit guarantees accuracy when nearby precisely known quantities are subtracted (benign cancellation). Sometimes a formula that gives inaccurate results can be rewritten to have much higher numerical accuracy by using benign cancellation; however, the procedure only works if subtraction is performed using a guard digit. The price of a guard digit is not high, because it merely requires making the adder one bit wider. For a 54 bit double precision adder, the additional cost is less than 2%. For this price, you gain the ability to run many algorithms such as formula (6) for computing the area of a triangle and the expression $\ln(1 + x)$. Although most modern computers have a guard digit, there are a few (such as Cray systems) that do not.
From what I understood, the enhanced formula,$\frac{ln(x+1)}{(1+x)-1}$, helps replacing the catastrophic cancellation with benign cancellation. I assumed $\ln(1+x)$ causes catastrophic cancellation.
My Question: I cannot follow how the catastrophic cancellation was replaced with benign cancellation when we replaced $\frac{ln(x+1)}{x}$ with $\frac{ln(x+1)}{(1+x)-1}$.
Can anyone please help clarifying this?
Thanks.
(1+2e-13)-1
gives2.000621890374532e-13
which is a rather large loss of precision, from 16 places to 4. The logarithm values confirm this, aslog(1+2e-13)=2.000621890374332e-13
whilelog1p(2e-13)=1.9999999999998001e-13
. – Lutz Lehmann Sep 11 '16 at 16:17