Computer Project 0
Catastrophic cancellation or loss of significant digits can occur due to roundoff
error in using a floating point number system. One must be on guard to avoid
situations that can lead to cancellation. This includes re-formulating equations,
increasing floating point precision, and minimizing the number of calculations.
The purpose of this project is to demonstrate the occurrence of cancellation and
illustrate the effect of preventative measures. We consider the simple function
on the interval (0.99, 1.01). This seems harmless enough!
Back to Cover Page
- a. Maple allows the precision of its floating point number system to altered. The
default precision of 10. To help illustrate the effect of roundoff error, set the
digits in Maple to be 6. For each of the following parts, generate 101 equally
spaced data points for the given functions and generate a graph using Maple.
- b. plot f(x) on the interval (0.99, 1.01).
- c. expand f(x) and plot on the interval (0.99, 1.01).
- d. Use Horner's method to evaluate the function in part c. at the same 101 points.
- e. Write a paragraph describing what you have observed.
- f. Repeat b.-e. but the digits set to be 15,20 and 25.