The inclusion of subnormal numbers in IEEE 754 was a controversial decision. In floating-point formats without subnormals, but with "hidden" 1 bits, how is/was 0 typically represented? Was an entire binade reserved for it, or was 0x00000000 in the lowest binade reserved as a special case? Or something else? (I suppose I should try booting up my old PDP-11, and see...)
How is 0.0 typically represented in the absence of subnormals?
48 Views Asked by Steve Summit At
2
There are 2 best solutions below
2
On
Example: entire binade reserved for it
A not-so-old FP format with a hidden one bit treated the first byte as the biased exponent and when the biased exponent was 0, the value was 0.0, without consideration of the "23 bit mantissa". I do not recall properties of a -0.0.
CCS compilers used to use (~12 yrs ago) this for much of their FP, but now mostly use IEEE 754.
When non-zero, it was easy to removed the sign bit, "or" in the hidden 1 bit and process the value.
From the pdp11 processor handbook, pdp11/04/24/34a/44/70, 1981, EB-19402-20, page 310:
It continues:
The next paragraph describes any bit pattern with a sign bit of 1 and a biased exponent of 0 as an “undefined variable.” So there was no −0; that bit pattern would be a NaN.