Binary integer decimal: Difference between revisions

Content deleted Content added
Fix some errors, add links to other articles .. 'format' section still not right, also should describe Canonical format.
Line 1:
The draft [[IEEE 754r]] standard proposedproposes twoan encoding formatsformat for decimal floating point numbers, in which the formatssignificands areof finite numbers (and the payloads of NaNs) can be encoded in two ways, referred to in the standarddraft as binary encoding and decimal encoding.<ref>{{cite web
| title = DRAFT Standard for Floating Point Arithmetic P754
| date = 2006-10-04
| url = http://754r.ucbtest.org/drafts/archive/2006-10-04.pdf
| accessdate = 2007-07-01 }}</ref>. The binary encoding format is referred to by Intel<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>
{{cite web
| title = IEEE 754R Decimal Floating-Point Arithmetic: Reliable and Efficient Implementation for Intel® Architecture Platforms
Line 11 ⟶ 13:
| accessdate = 2007-07-01 }}
</ref> and others as Binary Integer Decimal (BID).
-->
 
==Format==
[[Image:BID_general_format.PNG|right|frame|The three fields of a binary integerfinite decimal number using the binary encoding for the significand]]
A BIDfinite number using the binary encoding has three fields, the sign, the exponent, and the significand.
 
If the top bits of the exponent are less than or equal to binary 1110:
Line 34 ⟶ 38:
 
==Cohort==
A decimal floating point number can be encoded in several ways, the different ways represent different accuraciesprecisions, for example 100.0 could beis encoded as 1000*10<sup>-1</sup>, 100.00 could beis encoded as 10000*10<sup>-2</sup>. The set of possible encodings of the same numerical value is sometimes called a ''cohort''. 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==
The proposed IEEE 754r standard limits the range of numbers to thea muchsgnificand smaller range that can be represented byof the otherform encoding10<sup>n</sup>&minus;1 so describedthat by thedecimal standard,rounding [[Denselyis Packedeffected Decimal]]correctly.
 
{| class="wikitable"
|-
Line 86 ⟶ 89:
| 6143
|}
 
==Performance==
A binary encoding is inherently less efficient for conversions to or from decimal-encoded data, such as strings ([[ASCII]], [[Unicode]], etc.) and [[BCD]]. A binary encoding is therefore best chosen when the data are binary rather than decimal. IBM has published some unverified performance data at
[http://www2.hursley.ibm.com/decimal/decperf.html], however as both packages are available as open-source these figures could be verified indepedently.
 
==See Also==