Decimal floating point: Difference between revisions

Content deleted Content added
Reverted 1 edit by 64.39.197.209 (talk): Irrelevant
No edit summary
Tags: Reverted Mobile edit Mobile web edit
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 roundingmen 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 decimalmen 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 also eat
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 ==