Content deleted Content added
Reverted 2 edits by Tarikelmallah22 (talk): WP:SPAM. (TW) |
removed a sentence unrelated to BID from the LEDE and joined the remaining last two sentences |
||
(37 intermediate revisions by 22 users not shown) | |||
Line 1:
{{Use dmy dates|date=May 2019|cs1-dates=y}}
The [[IEEE 754-2008]] standard includes an encoding format for decimal floating point numbers in which the significand and the exponent (and the payloads of [[NaN]]s) can be encoded in two ways, referred to in the draft as binary encoding and decimal encoding.<ref>{{cite web▼
{{floating-point}}▼
| title = DRAFT Standard for Floating Point Arithmetic P754▼
{{Cleanup|reason=This article more describes DPD encoding and IEEE 754 encoding in general, rather than BID encoding which it should acc. it's title.|date=December 2024}}
| date = 2006-10-04▼
▲The [[IEEE 754-2008]] standard includes
| url = http://754r.ucbtest.org/drafts/archive/2006-10-04.pdf▼
| accessdate = 2007-07-01 }}</ref>▼
}}{{dead link|date=November 2016 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>
<!-- Not sure why this next one is here? Proprietary/trade marks and propaganda articles not scientific, surely? Arith18 paper would be much better
The binary encoding format is referred to by Intel<ref>
Line 15 ⟶ 19:
-->
Both formats break a number down into a sign bit ''s'', an exponent ''q'' (between ''q''<sub>min</sub> and ''q''<sub>max</sub>), and a ''p''-digit significand ''c'' (between 0 and 10<sup>''p''</sup>−1). The value encoded is (−1)<sup>''s''</sup>×10<sup>''q''</sup>×''c''. In both formats the range of possible values is identical, but they differ in how the significand ''c'' is represented. In the decimal encoding, it is encoded as a series of ''p'' decimal digits (using the [[densely packed decimal]] (DPD) encoding
▲{{floating-point}}
==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
* 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
s 10eeeeee (0)mmm mmmmmmmmmm mmmmmmmmmm
* If the significand starts with <code>100m</code>, omitting the leading 100 bits lets the significand fit into 21 bits. The exponent is shifted over 2 bits, and a <code>11</code> bit pair shows that this form is being used:
s
s
s
* Infinity, quiet [[NaN]] and signaling NaN use encodings beginning with <code>s 1111</code>:
s 11110 xxxxxxxxxxxxxxxxxxxxxxxxxx
Line 44 ⟶ 46:
==Cohort==
A decimal floating
==Range==
Line 102 ⟶ 104:
==Performance==
A binary encoding is inherently less efficient for conversions to or from decimal-encoded data, such as strings ([[ASCII]], [[Unicode]], etc.) and [[Binary-coded decimal|BCD]]. A binary encoding is therefore best chosen only when the data are binary rather than decimal. IBM has published some unverified performance data
==See also==
* [[IEEE 754]]
==References==
{{reflist}}
==Further reading==
* {{cite web |title=The Decimal Floating-Point Standard |author-first=John J. G. |author-last=Savard |date=2018 |orig-year=2007 |work=quadibloc |url=http://www.quadibloc.com/comp/cp020302.htm |access-date=2018-07-16 |url-status=live |archive-url=https://web.archive.org/web/20180703002322/http://www.quadibloc.com/comp/cp020302.htm |archive-date=2018-07-03}}
[[Category:Computer arithmetic]]
|