DEC64

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
m (Links)
(Changed primary category)
Line 1: Line 1:
 
{{FormatInfo
 
{{FormatInfo
 
|formattype=electronic
 
|formattype=electronic
|subcat=Binary Data
+
|subcat=Elements of File Formats
 
}}
 
}}
 
'''DEC64''' is a scheme to encode floating point numbers as a 56-bit coefficient and an 8-bit exponent, both expressed in [[two's complement]] binary form, with the exponent in the least-significant 8 bits of the 64-bit block. This is a "decimal" rather than a "binary" format because the exponent is in powers of ten rather than powers of two, though the exponent and coefficient are expressed as binary numbers. Because a decimal exponent is used, the format precisely expresses decimal fractions without the roundoff errors found in binary-exponent formats, making it useful for financial data.
 
'''DEC64''' is a scheme to encode floating point numbers as a 56-bit coefficient and an 8-bit exponent, both expressed in [[two's complement]] binary form, with the exponent in the least-significant 8 bits of the 64-bit block. This is a "decimal" rather than a "binary" format because the exponent is in powers of ten rather than powers of two, though the exponent and coefficient are expressed as binary numbers. Because a decimal exponent is used, the format precisely expresses decimal fractions without the roundoff errors found in binary-exponent formats, making it useful for financial data.
Line 10: Line 10:
 
* [http://dec64.com/ DEC64 overview]
 
* [http://dec64.com/ DEC64 overview]
 
* [[Wikipedia:decimal64 floating-point format|Wikipedia: decimal64 floating-point format, a related but different format]]
 
* [[Wikipedia:decimal64 floating-point format|Wikipedia: decimal64 floating-point format, a related but different format]]
 +
 +
[[Category:Binary Data]]

Revision as of 18:55, 4 December 2015

File Format
Name DEC64
Ontology

DEC64 is a scheme to encode floating point numbers as a 56-bit coefficient and an 8-bit exponent, both expressed in two's complement binary form, with the exponent in the least-significant 8 bits of the 64-bit block. This is a "decimal" rather than a "binary" format because the exponent is in powers of ten rather than powers of two, though the exponent and coefficient are expressed as binary numbers. Because a decimal exponent is used, the format precisely expresses decimal fractions without the roundoff errors found in binary-exponent formats, making it useful for financial data.

Integers may be expressed in DEC64 using an exponent of zero, allowing them to be processed using high-efficiency binary integer arithmetic operators. Any pair of numbers using the same exponent can be similarly processed with simple arithmetic without needing to act on the exponent. Rather than normalizing the exponential format as is common in other exponent-based formats, it is encouraged to use exponents that allow for such simple processing where appropriate, such as using zero exponents on all integer values within the allowed range.

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox