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

[REBOL] Re: Core 2.6 - Last minute requests - take your chance!

From: larry:ecotope at: 6-Apr-2002 18:19

Fix REBOL comparison operators (<, >, <=, >=, =, <>) so they work correctly for decimal values. Example:
>> a: 2 ** 52
== 4.5035996273705E+15
>> b: a + 1
== 4.5035996273705E+15
>> a = b
== true
>> b - a
== 1
>> zero? b - a
== false In this case a and b test equal although they differ by one. The comparison operators should give the same results for REBOL decimals as the underlying C language does for doubles. Note that ZERO?, POSITIVE?, and NEGATIVE? give the correct results. See the comments in decimal.r on the Ecotope rebsite for more details. -Larry