[REBOL] Re: Arithmetic precision
From: sanghabum:aol at: 3-Feb-2001 6:09
In a message dated 02/02/2001 18:32:44 GMT Standard Time,
[gmassar--dreamsoft--com] writes:
> Arithmetic precision in REBOL is only 64 bits long including the exponent
> for a decimal! value according to some IEEE standard. I think REXX relies
> heavily on so called Math of numbers. For instance, most of divisions have
> some repetition in the decimal part. E.g., in your case,
<snip>
Thanks for the response. Rexx does all it's arithmetic long hand on strings,
much the same way we learnt at school. Which gives it 10.01 out of 10.01 for
precision, but minus several dozen for speed. Not a language you'd want to
write a spreadsheet in, unless your users were very patient
I thought I'd try thinking more like a Rebol than a Royalist (would that be
an old Rexx supporter?) and try to recast my code using tuples. After all, at
first glance, they seem to offer structured digit strings of arbitrary length.
Unfortunately not. They only have a maximum of 10 parts, and each part must
be less that 256.
These limitations seem arbitrary and bizarre. Am I missing some awesome
subtly of the language? (It wouldn't be the first time).
In the meantime, I'll keep puzzling over how to get an exact result from
something like:
a: 123456789.123456789 - 123456789