** Next:** Polynomial Evaluation
** Up:** Taylor Polynomials
** Previous:** Important functions
** Contents**

`Write a program to plot
`

`
The trouble is that, when ,
.
We can overcome this problem with Taylor approximating
polynomials:
`

`
and therefore
`

`
The Taylor approximation is well defined (even for ).
`
`The second problem requires to accurately evaluate
`

`
for
.
We see that
`

`
Now, for , in single precision arithmetic,
`

`
and
`

`Clearly this result is corrupted by a large error.
The source is the subtraction of two almost equal numbers,
and 1. Most of the significant digits will cancel out
(in our case, the first 7 significant digits)
`

`
This is called a `*loss of significance error* (or
*cancellation* error). Now, we need to divide the small
and inacurate number
by the small number
, which is in fact a multiplication by .
The errors of order will become now errors of
order .

`
Hence, by this division to a small number, the errors migrated
from the digit after the decimal point to the first digit
before the decimal point (which is 0, instead of 1).
`
`Using a Taylor polynomial of order 5,
`

`
we can overcome the loss of significance error. Besides, this
Taylor approximation is well defined (and equal to 1) when .
For the Taylor approximation value is
, correct in the first 7 digits.
`

** Next:** Polynomial Evaluation
** Up:** Taylor Polynomials
** Previous:** Important functions
** Contents**
Adrian Sandu
2001-08-26