GATE Computer ScienceVery hardGATE CSE · UGC NET

In IEEE 754 single precision with round-to-nearest-even, the value 0.1 (itself rounded to single precision) is added to an accumulator starting at 0 ten times, rounding after every addition. How does the final sum compare with 1.0?

  1. A. It is exactly 1.0
  2. B. It is one ulp (2⁻²⁴) below 1.0
  3. C. It is exactly one ulp (2⁻²³) above 1.0
  4. D. It is one ulp (2⁻²³) below 1.0

Correct answer: C. It is exactly one ulp (2⁻²³) above 1.0

Float32 accumulation of 0.1 ten times gives 1.00000011920929 = 1 + 1 × 2⁻²³, because 0.1 is stored slightly high and rounding errors do not cancel.

More Computer Organization and Architecture questions

Exams that ask this topic