I think that precision when dealing with money is very important (more
important than speed). Money values should be handled internally as an
string of decimal digits, as in COBOL.
Very big numbers are frequent when you deal with money : $1,000,000,000
converted to a weakest currency can have 5 or 6 signficant digits.
They is other problems when calculating in base 2 instead of base 10 : the
numbers that have an infinite number of digite after the point are not the
same. It has an impact on rounded values.

Olivier.


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 12, 2000 12:57 AM
Subject: [REBOL] Problem with to-money ??? Re:(2)


>
> >It's a problem with the encoding of floating point numbers, not REBOL.
> >REBOL
> >uses floating point for money values. Try multiplying the numbers by a
> >thousand or a million and look for the little bits of imprecision.
>
>
> Too true! Too true!
>
> The following shows the result ot multiplying the total and trailer values
> by 1 million, and there's the difference.
>
> HEADER FOUND!!
> TRAILER FOUND!!
> RECS READ =  7112
> TOTAL   =  $410604386.69
> TRAILER   =  $410604386.69
> $410604386690000.75
> $410604386690000.00
> NOT BALANCED
>
> Mike.
>

Reply via email to