Re: double money

From: Irrwahn Grausewitz (irrwahn33_at_freenet.de)
Date: 04/15/04


Date: Thu, 15 Apr 2004 11:07:41 +0200


[Decimal vs. binary floating point number representation]

>"CBFalconer" <cbfalconer@yahoo.com> wrote:
>> So you need a good reason to use any such decimal organization.

"P.J. Plauger" <pjp@dinkumware.com> wrote:
>Indeed, and several have been cited:
>
>-- way faster conversion between external decimal and internal form
>
>-- no roundoff problems in conversion, either way
>
>-- exact representation of decimal fractions (important for tax laws)
>
>-- way easier rounding to Nth decimal place
>
>-- 0.1 * 10.0 == 1.0 (reducing reflector traffic)
>
>People seldom notice the loss of a bit or two of precision --
>witness all the truly awful math functions out there whose
>sins have gone unnoticed for decades. They *do* notice slow
>conversions, unexpected truncations, etc. as cited above.

The curious lurker can find an interesting reading at:

 http://www2.hursley.ibm.com/decimal

Regards

-- 
Irrwahn Grausewitz (irrwahn33@freenet.de) 
welcome to clc: http://www.ungerhu.com/jxh/clc.welcome.txt 
clc faq-list  : http://www.faqs.org/faqs/C-faq/faq/ 
clc OT guide  : http://benpfaff.org/writings/clc/off-topic.html