ESC 251 HW 3 Due: Sep 6

1)
a)
(2 pts) Compute the relative error in the expression 1-x4 when x=1.01. Use 3 digit, rounded arithmetic.
b)
(2 pts) Repeat a) using the equivalent expression (1-x2)(1+x2). Which expression is more accurate?
c)
(2 pts) Modify the expression in b) to obtain an expression that is even more accurate. Compute the resulting relative error.
NOTE: Be careful about how you compute x4.
2)
Each of the expressions below will suffer from catastrophic cancellation error for the given ranges of x. Rewrite the expressions so that catastrophic cancellation does not occur.
a)
(1 pt) for x large
b)
(2 pt) for
c)
(2 pt) for (HINT: Use the difference of 2 cubes).

2017-09-01