Binary integer decimal: Difference between revisions

Content deleted Content added
removed a sentence unrelated to BID from the LEDE and joined the remaining last two sentences
 
(6 intermediate revisions by 6 users not shown)
Line 1:
{{Use dmy dates|date=May 2019|cs1-dates=y}}
{{floating-point}}
{{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}}
The [[IEEE 754-2008]] standard includes decimal floating-point number formats in which the [[significand]] and the exponent (and the payloads of [[NaN]]s) can be encoded in two ways, referred to as '''binary encoding''' and ''decimal encoding''.<ref>{{cite web
|title=DRAFT Standard for Floating Point Arithmetic P754
Line 18 ⟶ 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 (&minus;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). This makes conversion to decimal form efficient, but requires a specialized decimal [[Arithmetic logic unit|ALU]] to process. while Inin the '''binary integer decimal''' ('''BID''') encoding, it is encoded as a binary number.
 
==Format==
Line 45 ⟶ 46:
 
==Cohort==
A decimal floating -point number can be encoded in several ways, the different ways represent different precisions, for example 100.0 is encoded as 1000×10<sup>−1</sup>, while 100.00 is encoded as 10000×10<sup>−2</sup>. The set of possible encodings of the same numerical value is called a ''cohort'' in the standard. If the result of a calculation is inexact the largest amount of significant data is preserved by selecting the cohort member with the largest integer that can be stored in the significand along with the required exponent.
 
==Range==