Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Q1. Find a positive floating point value x, for which x+1.0 x. Verify your resul

ID: 3706232 • Letter: Q

Question

Q1. Find a positive floating point value x, for which x+1.0 x. Verify your result using fp.s and tell us the hex representation of x. Q2. Find the smallest positive floating point value x for which x+1.0 -x. State the hex representation of X. Q3. Determine a set of positive floating point numbers such that adding these numbers in a different order can yield a different value You can do this using only three numbers. (Hint: Experiment with adding up different amounts of the x value you determined in Q2, and the value 1.0) Q4. Based on your answer for Q3, do floating points obey associative rule like integers?

Explanation / Answer

1. Any number greater than or equal to 223 or 8,388,608 will do.

2. So the smallest number is 223 or 8,388,608(0x400000). The float representation in hex is 4B000000.

3. (1.0 + 1.0) + 223 and 223 + (1.0 + 1.0) would give different result compared to any other grouping which would result in 223 itself.

4. No, it is apparent from answer of 3 that floating point numbers do not obey associative rule(ie. (a+b)+c=a+(b+c)) though they are commutative(a+b=b+a).