Content deleted Content added
Udo.bellack (talk | contribs) m →Format: typo |
|||
Line 19:
==Format==
Using the fact that 2<sup>10</sup> = 1024 is only slightly more than 10<sup>3</sup> = 1000, 3''n''-digit decimal numbers can be efficiently packed into 10''n'' binary bits. However, the IEEE formats have
This would not be efficient, because only 10 of the 16 possible values of the additional 4 bits are needed. A more efficient encoding can be designed using the fact that the exponent range is of the form 3×2<sup>''k''</sup>, so the exponent never starts with <code>11</code>. Using the Decimal32 encoding (with a significand of 3*2+1 decimal digits) as an example (<code>e</code> stands for exponent, <code>m</code> for mantissa, i.e. significand):
* If the significand starts with <code>0mmm</code>, omitting the leading 0 bit lets the
s 00eeeeee (0)mmm mmmmmmmmmm mmmmmmmmmm
s 01eeeeee (0)mmm mmmmmmmmmm mmmmmmmmmm
|