Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Arithmetic precision

From: sanghabum:aol at: 2-Feb-2001 4:50

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 digit14084507.056338028169014084507042253521126760563380281690140845070422535211267 605633802816901408450704225352112676056338028169014084507042253521126760563380 281690140845070422535211267605633802816901408450704225352112676056338028169014 08450704225352113 </result> Thanks, Colin.