Description
1. [10 pts] Using your favorite computer language, play around with some simple arithmetic
calculations and find one whose answer is incorrect because of the imprecision of floating-point
arithmetic. Submit the line of code, the correct answer (i.e., what you’d get if you were doing
that calculation with pencil & paper, with infinite-precision numbers), the answer that the
calculation produced on your computer, and an explanation of what it was that the computer
arithmetic system did that made the answer wrong.
2. [6 pts] Consider a variation of the IEEE standard in which the exponent is represented by
seven bits and the fractional part of the mantissa is represented by four bits. What are the
largest and smallest positive machine numbers that can be represented using this system, not
including ±∞ or ±0? Give your answers as both binary and decimal numbers. Assume that all
other rules of the IEEE standard apply, including normalized numbers and reserved exponent
values. Neglect subnormals (aka “graceful underflow”), which are permitted, but not required,
by that standard.
3. [6 pts] Consider a variation of the IEEE standard in which the exponent is represented by
e bits and the fractional part of the mantissa is represented by three bits. If the largest and
smallest positive machine numbers in this system are 15.0 and 0.25, respectively, what is e?
As in the previous problem, assume that all other rules of the IEEE standard apply.
4. [6 pts] Consider a computer that uses a really dumb arithmetic system that simply stores
numbers in n-bit memory locations by dicing up the desired number range into 2n −1 even-size
chunks. If the range of numbers to be stored is -100000 to 100000 and n = 5, what is the
(decimal) range of numbers that will be stored as 100002?
5. [4 pts] The thermometer at the top of the Panoramic lift at Winter Park registered 10
degrees Fahrenheit last Saturday morning, but the true temperature was 9 degrees. What were
the absolute and relative errors in that measurement?
6. A bit about roots
• [2 pts] Give an example of a function, f(x), that has no roots.
• [2 pts] Give an example of a function, f(x), that has exactly one root.
• [2 pts] Give an example of a function, f(x), that has an infinite number of roots.
• [2 pts] How many roots does f(x) = x
2 − 4x + 6 have? Are they real or complex?
1