From: Garance A Drosehn Date: 2005-07-07T01:27:19+09:00 Subject: Re: Ruby2c and large numbers On 7/5/05, Eric Hodel wrote: > > On 04 Jul 2005, at 15:22, Garance A Drosehn wrote: > > > > One nice thing about ruby is that the programmer does not have > > to worry about supported-ranges for integer values. Ruby just > > switches from "fixnum" objects into "bignum" objects, without > > any attention from the programmer. It seems to me that the C > > code that is listed above just assumes the multiplication of > > 'f * x' will not overflow. Is that the case? > > You are correct. > > We could add the ability to automatically add the bignum/fixnum > auto-conversion stuff, but we've not needed the capability yet. It would be nice to at least detect that an overflow occurred, even if you don't do the auto-conversion stuff. I do use ruby in some situations simply because I don't want to have to think if I'm going to be overflowing any fields that I'm collecting statistics into. I do think the Ruby2C project could be quite useful, but I wouldn't want to lose some of the more attractive characteristics of ruby when taking advantage of it! :-) -- Garance Alistair Drosehn = drosihn@gmail.com Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA