**1.8****a**, where machine epsilon , is the base of the system and is lowest possible value of exponent.**b**with being maximum value of exponent,**c****1.8****a****b**Here we divided numerator and denominator by to avoid overflow.

**c****d**Here we divided numerator and denominator by to avoid overflow.

**e**x = [1:1000]; y = (1+log(1+exp(-x))); sum(y)

**f**

(37)

**g**Calculate

Since , and , and , and using the fact that even number raised to the power of 10 is even, and odd number raised to teh power of 10 is odd, we obtain

**1.20**Homer states**a**If Horner right,**b**If Horner is right,**c**If Horner is right,**d**If Horner is right,**e**The product of two digit numbers may have up to digits. Therefore may have up to 48 digits, which is longer then Matlab's 16 digits. Therefore we can not use doubles in Matlab to either prove or disprove this conjecture.Note that can be explicitly calculated on a computer with inifinite precision (check out vpa command in matlab), because it is an integer. Using the “sym” command, or Mathematica allows us to get the answer:

**1.24**Here we deal with**1.27**(a) For some large integer value of the increment will be too small to change the sum. In other words the increment will be less than machine precision over two. At that time values of and will be the same, and the sum will stop changing.

(b)

s=1;ss=0;k=1;while s~=ss k=k+1;ss=s;s=s+1/k^2;end;s

returns the value ofSince the answer is between and , the floating point numbers are machine epsilon apart. Therefore the algorith stops when , or at the integer that is closest to .

Comparing the result of the code to we see the error of about , so there are correct 8 digits.

(c) In the previous example we have seen that making calculations that are accurate to 16 digits, we get an answer that is correct to 8 digits.

One way to increase accuracy is to use the “vpa” command as follows:

s=1;ss=0;k=1;while s~=ss k=k+1;ss=s;s=vpa(s+1/k^2,20);end;s

Alternatively, here is one more idea to check out. If the result is correct to digits, it means that the effective epsilon of the result is . Therefore the computer has obtained the correct result for

We than may compute a separate sum for between the value in (40) and the new value of- (a)
The number of flops to compute is . The proposed algorithm will use flops for even and for odd .

(b)

Since computer operates in binaries, the proposed formula for takes advantage of binary representation. The trick is to decompose the in the sum of powers of two, and calculate each power of two by using the shortcut of (a), and then add the result.

The proposed algorithm will use 11 flops instead of 28.

(c)

(d)

Using the Table 1.3 we compute the total flops to be . This number is independent, so it works faster for large and significantly faster for very large .

**Old Problems**

**a**

Use Taylorâ€™s theorem to show that

Denoting and using

**b** Why

**c**

Since and , we get . More precisely, . Use this together with (41) and (42) to get

(42) |

**d** This question implies that

If this property is not satisfied, then the result can not be obtained.

To obtain this result, write

Author's note: in (d) the right hand side shoule be and in (e) the right hand side should be .

**e**
The RHS can be rewritten as

**f** Using
we get . Picture
shows that accuracy is obtained at , i.e.
. In other words the estimate is optimistic.