Decimal64 floating-point format: Difference between revisions

Content deleted Content added
correct title
No edit summary
Line 27:
If the leading 4 bits of the significand is between 0 and 7, the number begins as follows
 
s 0000mmm xxxxxxx Exponent begins with 00, significand with 0mmm
s 0101mmm xxxxxxx Exponent begins with 01, significand with 0mmm
s 1010mmm xxxxxxx Exponent begins with 10, significand with 0mmm
 
If the leading 4 bits of the significand are binary 1000 or 1001 (decimal 8 or 9), the number begins as follows:
 
s 11001100m xxxxx Exponent begins with 00, significand with 100m
s 11011101m xxxxx Exponent begins with 01, significand with 100m
s 11101110m xxxxx Exponent begins with 10, significand with 100m
 
The following bits (xxx in the above) encode the additional exponent bits and the remainder of the most significant digit, but the details vary depending on the encoding alternative used. There is no particular reason for this difference, other than historical reasons in the eight-year long development of IEEE 754-2008.
Line 41:
The final combinations are used for infinities and NaNs, and are the same for both alternative encodings:
 
s 11110 x ±Infinity (see [[Extended real number line]])
s 11111011111 0 quiet NaN (sign bit ignored)
s 11111111111 1 signaling NaN (sign bit ignored)
 
In the latter cases, all other bits of the encoding are ignored. Thus, it is possible to initialize an array to NaNs by filling it with a single byte value.
Line 83:
 
s 11110 xx...x ±infinity
s 11111011111 x0x...x a quiet NaN
s 11111111111 x1x...x a signalling NaN
 
=== Densely packed decimal significand field ===