Thank you.

Very interesting, I hope this is well documented as a potential gotcha, in
that when dividing an integer by 100 you can get a number with more than 2
decimal places!

I do think it is also somewhat confusing and inconsistent that when you
print a money value, it only prints out 2 decimal places, yet when doing
comparisons, it can use more than 2.

Also is there any way of making print add ',' as thousand separators??
as in $999,999,999.99.

Mike.

>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.

>To get round this, convert your number values (times 100) into >integers,
and
>only convert to money for printing.



Reply via email to