From: Ben Tilly Date: 2001-02-23T03:25:54+09:00 Subject: [ruby-talk:11336] Re: numerical limits raja@cs.indiana.edu (Raja S.) wrote: > >Is there a way in Ruby to determine the largest/smallest representable >Fixnum and Float? Since Ruby levarages off the underlying C system this >will be architecture dependent. I'm looking for something like >Fixnum::MAX, >Fixnum::MIN and similarly for Floats. You could add a method to do it for Fixnum based on the existing size method. See: http://www.rubycentral.com/book/ref_c_fixnum.html Floats don't seem to have any way to do it: http://www.rubycentral.com/book/ref_c_float.html Which is mildly ironic since the automatic conversion to Bignum makes the limit irrelevant for Fixnum, but what the limit is matters for Float. >If it isn't currently builtin, it seems that as the language evolves, this >may be one of the dotting the 'i's and crossing the 't's issue. I am not seeing it at the moment, but is there any equivalent to Perl's Configure module? In Perl this gives in one place all of the information that Perl discovered while being configured before being built. This is then available and is used (see ExtUtils::MakeMaker) for writing makefiles for all following modules. The result allows policy decisions made while installing Perl to be transparently used by all CPAN modules. If Ruby doesn't have this, it would be very nice. I have seen RAA applications that just assume that they know where they should install on my system, making it hard to test them out with a private user installation first. That is the kind of thing that Configure is meant to detect and avoid. A sample reason to use this would be to test how a bunch of applications will work with a new development version of Ruby *without* having to replace your installed main version... Cheers, Ben _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com