Colin,

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, 

  1000000001 / 71 = 14084507.05633802816901408450704225352112676'

The quote mark at the end indicates the repetition. REBOL code below will
produce the precision as long as 250 digits.

  >> S: "14084507."
  >> R: "05633802816901408450704225352112676"
  >> loop 7 [S: join S R]  print S

Actually, it is 253 digits long. Compare the result against REXX result
below. That's all I can help you. I majored Math some 35 years ago and I
hardly remembered what I learned.  

Geo ...


[EMAIL PROTECTED] wrote:
> 
> Is there any way in Rebol that I can extend the number of significant digits
> when doing arithmetic?
> 
> I'm trying (as a Rebol-learning exercise) to convert some old Rexx code. In
> Rexx, the problem is trivial:
> 
> <rexx program:>
> /* rexx */
> a = 1000000001
> b = 71
> say "  default=" a / b
> numeric digits 25
> say " 25 digit=" a / b
> numeric digits 250
> say "250 digit=" a / b
> </rexx program>
> 
> <result>
>   default= 14084507.1
>  25 digit= 14084507.05633802816901408
> 250 digit=
> 14084507.056338028169014084507042253521126760563380281690140845070422535211267
> 
> 605633802816901408450704225352112676056338028169014084507042253521126760563380
> 
> 281690140845070422535211267605633802816901408450704225352112676056338028169014
> 
> 08450704225352113
> </result>
> 
> Thanks,
> Colin.
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to