{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Fall2011-HW1-Soln

# Fall2011-HW1-Soln - Homework 1 Solutions Math 371 Fall 2011...

This preview shows pages 1–2. Sign up to view the full content.

Homework 1 Solutions Math 371, Fall 2011 1. (Finite precision numbers) The floating point representation of a real number takes the form x = ± (0 .a - 1 a - 2 . . . a - n ) β · β e , where a - 1 = 0 , - M e M . Suppose that β = 2 , n = 4 , and M = 5 . (a) Find the smallest and largest positive numbers that can be represented in this floating point system. Give your answers in decimal form. The largest positive number that can be represented in this floating point system is +(0 . 1111) 2 · 2 5 = 30 . The smallest positive number is +(0 . 1000) 2 · 2 - 5 = 0 . 015625 (Recall that the first digit to the right of the decimal must be nonzero.) (b) Find the floating point number in this system that is closest to 2 . The number closest to 2 = 1 . 4142 · · · is +(0 . 1011) 2 · 2 1 = 1 . 375 . 2. (Rounding arithmetic) Use three-digit, decimal rounding arithmetic (i.e., β = 10 and n = 3 ) to compute the following sums. Add the numbers by hand in the specified order. (a) 6 k =1 1 3 k (b) 6 k =1 1 3 7 - k The first sum equals 0.498 .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}