Content deleted Content added
restructuring and precise references Tags: Reverted Visual edit |
structured explanation of sign, exponent and significand bits Tags: Reverted Visual edit |
||
Line 21:
* [[Significand]] [[precision (arithmetic)|precision]]: 113 bits (112 explicitly stored)
<!-- "significand", with a d at the end, is a technical term, please do not confuse with "significant" -->
{| class="wikitable"
|+ binary128 encoding
|-
! <u>S</u>'''ign'''!! <u>E</u>xponent
!<u>H</u>idden leading significant bit!! <u>T</u>railing significand bits
|-
! 1 bit !! {{val|15|u=bits}}
!1 bit!! {{val|112|u=bits}}
|-
| <code>s</code> || eeeeeeeeeeeeeee
|h|| tt tttttttttt tttttttttt tttttttttt tttttttttt tttttttttt tttttttttt tttttttttt tttttttttt tttttttttt tttttttttt tttttttttt
|}
* The sign bit determines the sign of the number (including when this number is zero, which is [[Signed zero|signed]]), "1" stands for negative.
* The exponent bits encode a binary integer from 0 up to 32767, from which a 'bias' of 16383 is subtracted to get the 'effective exponent' between -16382 and +16383. The values biased 0 and 32767 (de-biased -16383 and 16384) are reserved for special values, 'denormals', zeroes, infinities and NaN's (Not a Number).
* The hidden (implicit) bit combined with the trailing significand bits encode a binary value which is (mostly, see 'integral view') understood as h.tt tttttttttt .. tttttttttt<sub>b</sub>. The hidden bit is "1" for 'normal' values, while 'denormal' values which fill the gap between the smallest 113 bit precision value and zero with gracefully degrading relative precision are encoded with an exponent of biased 0, de-biased -16383, and then calcuated with a hidden bit "0" and an effective exponent of -16382.
This gives from 33 to 36 significant decimal digits precision. If a decimal string with at most 33 significant digits is converted to the IEEE 754 quadruple-precision format, giving a normal number, and then converted back to a decimal string with the same number of digits, the final result should match the original string. If an IEEE 754 quadruple-precision number is converted to a decimal string with at least 36 significant digits, and then converted back to quadruple-precision representation, the final result must match the original number.<ref name="whyieee">{{cite web |author=Kahan |first=Wiliam |date=1 October 1987 |title=Lecture Notes on the Status of IEEE Standard 754 for Binary Floating-Point Arithmetic |url=http://www.cs.berkeley.edu/~wkahan/ieee754status/IEEE754.PDF}}</ref>
|