oinkoink+unet / rexx.com (Bret Jolly) wrote in message news:<7e7131a1.0309021034.35e70d0f / posting.google.com>...
> I can't get BigDecimal to generate a -Infinity,
> using the same tricks that used to work with BigFloat.

   Following up to myself yet again (*blush*):

   Even after correcting bigdecimal.h so that
#define SZ_NINF "+Infinity"
   becomes
#define SZ_NINF "-Infinity"
    I get peculiar behavior.

irb(main):001:0> require 'bigdecimal'
true
irb(main):002:0> a = BigDecimal.new("1")/BigDecimal.new("0")
#<BigDecimal:400cc144,'Infinity',4(24)>
irb(main):003:0> b = -a
#<BigDecimal:400c43e0,'-Infinity',4(12)>
irb(main):004:0> c = -b
#<BigDecimal:400bc528,'-Infinity',4(12)>
irb(main):005:0> a == b 
false
irb(main):006:0> b == c # ?!!
true