From: Paul Brannan Date: 2008-12-06T06:12:09+09:00 Subject: [ruby-core:20393] Re: Leave my open classes alone (was Behavior: autoload calls rb_require() directly) On Sat, Dec 06, 2008 at 04:46:36AM +0900, Brent Roman wrote: > > Paul, > > As we all know, Ruby > Integers are 32-bits or 64-bits wide, but Fixnums are somewhat smaller. > They get transparently promoted by Bignums as needed. > Similarly, a 64-bit VM could define SmallFloats. These would be a floats > few bits > short of 64-bits that are promoted to a full Floats as needed. You can't easily do these sorts of tricks with floating point numbers; it breaks IEEE floating point compatibility. On some platforms you might be able to get away with breaking out the exponent and dropping a few bits off it, but you'd want a LOT of unit tests to ensure you don't introduce a subtle incompatibility. Floating point code can be very fragile, and I'd feel much better about a solution that leaves the floating point number intact. Paul