Homework 7.

Assigned: Mon Oct 25. Due: Mon Nov 1, at midnight

1. Exercise 17.2 in the text.
2. The functions log1p and expm1 are defined by log1p(x)=log(1+x) and expm1(x)=exp(x)-1.
• (a) What are the condition numbers of these functions (as a function of x)? For any x where the formula using the derivative is not defined, use the limit if it exists.
• (b) Suppose we compute log1p and expm1 in the obvious way, using the built-in log and exp functions. We want to know whether such algorithms are stable. For the purposes of this question, by "stable" we just mean that the algorithm returns answers with an accuracy that is approximately as good as can be expected given the condition numbers; in other words, the relative accuracy is approximately what we expect from our "Rule of Thumb" (number of accurate digits in f(x) is approximately number of accurate digits in x minus log_10 of the condition number of f at x). Furthermore, we are interested in particular values of x, not random values: what are the interesting values of x in each case? There are two ways we can check stability.
1. Theoretical: what do the condition numbers of log and exp tell us will happen if we use these algorithms to implement log1p and expm1?
2. Experimental: compare the results with those returned by the special built-in log1p and expm1 functions, and make conclusions.