0
votes

Here is the question about round and guard digits in IEEE-754 floating point number representation. According to the standard, two additional digits are reserved for calculations. Assume two digits after the point are available and

   2.3400
+  0.0256
  --------
   2.3656

Now, guard is 5 and round is 6 and since 56>50, then it is rounded to 100, therefore, the result is 2.37

However, if you don't assume the guard and round digits and only assume the additional digit is between 5 and 9, then you will round it again to 10 and the result is 2.37

So, my question is, in which situation the traditional rounding mechanism (0 to 4 are rounded to 0 and 5 to 9 are rounded to 10) fail while guard and round digits are helpful?

1
It seems that you mean to refer to IEEE 754, although the title of your question is about IEEE 745 and the body IEEE 75. As far as I remember, IEEE 754 does not say anything about round and guard bits, since it describes what the results should be on a compliant system and not how to reach these results. Also the first sentence of your question is about bits and your example is in decimal.Pascal Cuoq
It is possible that the question you intend to ask (modulo the “example in base 10” confusion) is the one answered at pages.cs.wisc.edu/~david/courses/cs552/S12/handouts/…Pascal Cuoq
I edited the post. That example came from the Patterson's book (computer architecture: HW/SSW interface).mahmood

1 Answers

2
votes

The problem is that the IEEE rounding rules result for 2.3650 is 2.36, not 2.37. If the exact answer is exactly half way between two representable numbers, it is rounded to the one that is even. In binary, that is the one that has a zero in the least significant bit.

If the exact answer is the slightest bit greater than 2.365, it rounds to 2.37.

The round bit distinguishes these cases.