Numerical Analysis I, Fall 2009 (http://www.math.nthu.edu.tw/˜ wangwc/)

Homework Assignment for Week 03

Assigned Oct 02, 2009. Due Oct 09, 2009.

1. What is the floating point number represented by

10101000 01010000 00000000 00000000

in IEEE single precision?

Note: IEEE single precision is illustrated in Table 2.1 and 2.2. Note the difference between “E” and “e”. There was a mistake in class about ordering of the significand (mantissa) and the exponent. Please correct it in your notes.

2. Section 2.1: Problem 5. You may find the command ’format hex’ in Matlab helpful in finding an explanation of the result. How do you avoid this mistake from happening in practice?

3. Section 2.2: Problem 5, 15. For problem 15, report your results in writing or printing. Need not hand in the code.

4. Section 2.3: Problem 6, 11.

5. Section 2.4: Problem 1(a). Report your results in writing or printing. Need not hand in the code. You may find the format “for i = n : −1 : 1, ⋯” convenient in this problem. In some situations (not necessarily here), you may also find “a = n : −1 : 1” useful.