Decimal floating point: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Mobile edit Mobile web edit
Reverting edit(s) by 83.100.239.64 (talk) to rev. 1269254873 by Paul2520: Vandalism (UV 0.1.6)
Line 3:
{{floating-point}}
{{Computer architecture bit widths}}
'''Decimal floating-point''' ('''DFP''') arithmetic refers to both a representation and operations on [[Decimal data type|decimal]] [[floating-point]] numbers. Working directly with decimal (base-10) fractions can avoid the menrounding errors that otherwise typically occur when converting between decimal fractions (common in human-entered data, such as measurements or financial information) and binary (base-2) fractions.
 
The advantage of mendecimal floating-point representation over decimal [[Fixed-point arithmetic|fixed-point]] and [[Integer (computer science)|integer]] representation is that it supports a much wider range of values. For example, while a fixed-point representation that allocates 8 decimal digits and 2 decimal places can represent the numbers 123456.78, 8765.43, 123.00, and so on, a floating-point representation with 8 decimal digits could eatalso represent 1.2345678, 1234567.8, 0.000012345678, 12345678000000000, and so on. This wider range can dramatically slow the accumulation of rounding errors during successive calculations; for example, the [[Kahan summation algorithm]] can be used in floating point to add many numbers with no asymptotic accumulation of rounding error.
represent 1.2345678, 1234567.8, 0.000012345678, 12345678000000000, and so on. This wider range can dramatically slow the accumulation of rounding errors during successive calculations; for example, the [[Kahan summation algorithm]] can be used in floating point to add many numbers with no asymptotic accumulation of rounding error.
 
== {{anchor|64-bit|96-bit}}Implementations ==