From: Drew Raines Date: 2007-01-20T05:10:08+09:00 Subject: Negative Float conversion to Fixnum I'm sure this has been hashed out somewhere on the list before, but my searches have turned up fruitless. I had a strange issue come up while diagnosing a unit test failure. Notice the first dialog compared with the rest of this IRB session. What causes -3930.0 to be converted to a Fixnum as -3929 only after it's been multiplied by 100 or 100.0? Even weirder is that it seems to only be *this* number. Can I workaround this? >> (-39.30 * 100).to_i => -3929 >> (-39.30 * 100.0).to_i => -3929 >> -3930.0.to_i => -3930 >> (-39.31 * 100).to_i => -3931 >> (-9999.99 * 100).to_i => -999999 $ ruby -v ruby 1.8.5 (2006-12-04 patchlevel 2) [i686-linux] Thanks. -Drew