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

[REBOL] -2147483648 bug

From: rotenca::telvia::it at: 15-Dec-2002 11:55

Hi all, Some -2147483648 problems: 1) -2147483648 what should be? integer!?
>> type? -2147483648
== decimal!
>> type? to-integer -2147483648
== integer! 2) abs fails
>> abs -2147483648
== 2147483648
>> abs to-integer -2147483648
== -2147483648 3) no overflow
>> i: to-integer -2147483648
== -2147483648
>> i + i
== 0 4) negative?
>> negative? i
== false 5) negate
>> - i
== -2147483648 and so on --- Ciao Romano