Question: Exercise 3.13 Operations performed on fi xed-point integers behave the way one expectsthe commutative, associative, and distributive laws all hold. This is not always the
Exercise 3.13 Operations performed on fi xed-point integers behave the way one expects—the commutative, associative, and distributive laws all hold. This is not always the case when working with fl oating-point numbers, however. Let’s fi rst look at the associative law. The following table shows sets of decimal numbers.
A B C
a. –1.6360 x 104 1.6360 x 104 1.0 x 100
b. 2.865625 x 101 4.140625 x 10–1 1.2140625 x 101 3.13.1 [20] <3.2, 3.5, 3.6> Calculate (A + B) + C by hand, assuming A, B, and C are stored in the 16-bit NVIDIA format described in Exercise 3.11.2 (and also described in the text). Assume one guard, one round bit and one sticky bit, and round to the nearest even. Show all the steps, and write your answer both in 16-bit fl oating-point format and in decimal.
3.13.2 [20] <3.2, 3.5, 3.6> Calculate A + (B + C) by hand, assuming A, B, and C are stored in the 16-bit NVIDIA format described in Exercise 3.11.2 (and also described in the text). Assume one guard, one round bit and one sticky bit, and round to the nearest even. Show all the steps, and write your answer both in 16-bit fl oating-point format and in decimal.
3.13.3 [10] <3.2, 3.5, 3.6> Based on your answers to Exercise 3.13.1 and Exercise 3.13.2, does (A + B) + C = A + (B + C)?
The following table shows further sets of decimal numbers.
A B C
a. 4.8828125 x 10–4 1.768 x 103 2.50125 x 102
b. 4.721875 x 101 2.809375 x 101 3.575 x 101 3.13.4 [30] <3.3, 3.5, 3.6> Calculate (A × B) × C by hand, assuming A, B, and C are stored in the 16-bit NVIDIA format described in Exercise 3.11.2 (and also described in the text). Assume one guard, one round bit and one sticky bit, and round to the nearest even. Show all the steps, and write your answer both in 16-bit fl oating-point format and in decimal.
3.13.5 [30] <3.3, 3.5, 3.6> Calculate A × (B × C) by hand, assuming A, B, and C are stored in the 16-bit NVIDIA format described in Exercise 3.11.2 (and also described in the text). Assume one guard, one round bit and one sticky bit, and round to the nearest even. Show all the steps, and write your answer both in 16-bit fl oating-point format and in decimal.
3.13.6 [10] <3.3, 3.5, 3.6> Based on your answers to Exercise 3.13.4 and Exercise 3.13.5, does (A × B) × C = A × (B × C)?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
