# Homework 3

### Work out, but don't turn in

• Textbook problems 5.2-5.12 (as many problems as you think you need to be certain you understand what's going on). See if you get the same answers as your classmates.
• Textbook problems 6.3-6.9 (similarly).

### To be turned in

• Textbook problems 5.13, 5.14 (handle only the case of shifting by one bit)
• Textbook problems 6.1, 6.2, 6.13
• Suppose you are given a large (hundreds or thousands) sorted list of positive floating-point numbers, and are asked to add them up on a computer. Should you add them in increasing order, decreasing order, some other order, or does it not matter?
• The IBM 370 used a floating-point format somewhat like the modern IEEE standard (which hadn't been invented yet), but not quite the same. The biggest difference was that the exponent field was treated as a power of 16, rather than as a power of 2. Thus for example the number 80 = 5 * 16 would be normalized to 1.010000... * 26 in IEEE, but to 0.101000... * 162 in IBM 370. Discuss the pros and cons of this approach in contrast to the IEEE standard, with particular attention to precision and range.