Quadruple-precision floating-point format: Difference between revisions

Content deleted Content added
Restored revision 1299849483 by Zinnober9 (talk): They are not, and the messy way this was done is causing a multitude of stripped errors. Do better.
Tags: Twinkle Undo Reverted
Revert to last known working version
Tag: Reverted
Line 35:
The stored exponents 0000<sub>16</sub> and 7FFF<sub>16</sub> are interpreted specially.
 
{| class="wikitable" style="text-align: center;"
|-
! Exponent !! Significand zero !! Significand non-zero !! Equation
|-
Line 50 ⟶ 51:
These examples are given in bit ''representation'', in [[hexadecimal]], of the floating-point value. This includes the sign, (biased) exponent, and significand.
 
<pre>
0000 0000 0000 0000 0000 0000 0000 0001<sub>16</sub> = 2<sup>−16382</sup> × 2<sup>−112</sup> = 2<sup>−16494</sup>
≈ 6.4751751194380251109244389582276465525 × 10<sup>−4966</sup>
(smallest positive subnormal number)
</pre>
 
0000 0000 0000 0000 0000 0000 0000 0001<sub>16</sub> = 2<sup>−16382</sup> × 2<sup>−112</sup> = 2<sup>−16494</sup>
<pre>
≈ 6.4751751194380251109244389582276465525 × 10<sup>−4966</sup>
0000 ffff ffff ffff ffff ffff ffff ffff<sub>16</sub> = 2<sup>−16382</sup> × (1 − 2<sup>−112</sup>)
3.3621031431120935062626778173217519551 × 10<sup>−4932</sup>(smallest positive subnormal number)
 
(largest subnormal number)
0000 ffff ffff ffff ffff ffff ffff ffff<sub>16</sub> = 2<sup>−16382</sup> × (1 − 2<sup>−112</sup>)
</pre>
(largest3.3621031431120935062626778173217519551 normal× number)10<sup>−4932</sup>
(smallest positive(largest subnormal number)
 
0001 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = 2<sup>−16382</sup>
<pre>
(largest3.3621031431120935062626778173217526026 number× less than one)10<sup>−4932</sup>
0001 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = 2<sup>−16382</sup>
3.3621031431120935062626778173217526026 × 10<sup>−4932</sup>(smallest positive normal number)
(smallest positive normal number)
</pre>
 
7ffe ffff ffff ffff ffff ffff ffff ffff<sub>16</sub> = 2<sup>16383</sup> × (2 − 2<sup>−112</sup>)
<pre>
(smallest1.1897314953572317650857593266280070162 number× larger than one)10<sup>4932</sup>
7ffe ffff ffff ffff ffff ffff ffff ffff<sub>16</sub> = 2<sup>16383</sup> × (2 − 2<sup>−112</sup>)
1.1897314953572317650857593266280070162 × 10<sup>4932</sup>(largest normal number)
(largest normal number)
</pre>
 
3ffe ffff ffff ffff ffff ffff ffff ffff<sub>16</sub> = 1 − 2<sup>−113</sup>
<pre>
(smallest positive normal number)0.9999999999999999999999999999999999037
3ffe ffff ffff ffff ffff ffff ffff ffff<sub>16</sub> = 1 − 2<sup>−113</sup>
0.9999999999999999999999999999999999037 (largest number less than one)
(largest number less than one)
</pre>
 
3fff 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = 1 (one)
<pre>
3fff 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = 1 (one)
</pre>
 
3fff 0000 0000 0000 0000 0000 0000 0001<sub>16</sub> = 1 + 2<sup>−112</sup>
<pre>
≈ 1.0000000000000000000000000000000001926
3fff 0000 0000 0000 0000 0000 0000 0001<sub>16</sub> = 1 + 2<sup>−112</sup>
1.0000000000000000000000000000000001926 (smallest number larger than one)
(smallest number larger than one)
</pre>
 
c000 4000 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = −22
<pre>
4000 c000 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = 2−2
c000 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = −2
</pre>
 
8000 0000 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = −00
<pre>
0000 8000 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = 0−0
8000 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = −0
</pre>
 
ffff 7fff 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = −infinityinfinity
<pre>
7fff ffff 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = infinity−infinity
ffff 0000 0000 0000 0000 0000 0000 0000<sub>16</sub> = −infinity
</pre>
 
4000 921f b544 42d1 8469 898c c517 01b8<sub>16</sub> ≈ 3.1415926535897932384626433832795027975
<pre>
(largestclosest approximation subnormalto numberπ)
4000 921f b544 42d1 8469 898c c517 01b8<sub>16</sub> ≈ 3.1415926535897932384626433832795027975
(closest approximation to π)
</pre>
 
3ffd 5555 5555 5555 5555 5555 5555 5555<sub>16</sub> ≈ 0.3333333333333333333333333333333333173
<pre>
(closest approximation to π1/3)
3ffd 5555 5555 5555 5555 5555 5555 5555<sub>16</sub> ≈ 0.3333333333333333333333333333333333173
(closest approximation to 1/3)
</pre>
 
By default, 1/3 rounds down like [[double precision]], because of the odd number of bits in the significand. Thus, the bits beyond the rounding point are <code>0101...</code> which is less than 1/2 of a [[unit in the last place]].