in reply to Re^7: Decimal Floating Point (DFP) and does Perl needs DFP?
in thread Decimal Floating Point (DFP) and does Perl needs DFP?
I needed a predictable accuracy for pow(6e7) of a decimal fraction. (a highly constructed use case)
BigFloat is decimal thus avoiding binary rounding errors in this case and the limited number of multiplications allowed a boundary for the necessary precision.( 1 extra digit per multiplication)
I have no doubt that other algorithms can be faster or more accurate with less digits.
This whole thread is somehow spooky for me, financial transactions follow their own rules and rarely involve exponents bigger 100.
Natural processes in science have no reason to be decimal. If a measurement is expressed as a decimal this already involves an errormargin. (bacterias don't grow exactly x%)
I.e. decimals are normally human made!
So if accuracy is a problem this can't be fully solved with a general purpose library.
Eg IIRC do some fiscal authorities or banks calculate with special rounding units.
That's not solved with 128 digits accuracy...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Decimal Floating Point (DFP) and does Perl needs DFP?
by syphilis (Archbishop) on Jan 21, 2015 at 06:44 UTC | |
by LanX (Saint) on Jan 21, 2015 at 10:10 UTC | |
by syphilis (Archbishop) on Jan 21, 2015 at 11:39 UTC | |
by BrowserUk (Patriarch) on Jan 21, 2015 at 11:48 UTC | |
by syphilis (Archbishop) on Jan 22, 2015 at 13:12 UTC | |
| |
by LanX (Saint) on Jan 21, 2015 at 12:02 UTC |