From: raja@... (Raja S.) Date: 2001-02-23T12:40:08+09:00 Subject: [ruby-talk:11362] Re: numerical limits "Ben Tilly" writes: > 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 So it seems. In one of the apps I'm working on I have multiple streams of data which are sampled at various times. Sometimes a sampling could be empty. I need to find the minimum from each sampling and do further processing. Using a default of Float::MAX just makes the code a little bit simpler when dealing with the situation when a stream is empty. Of course a MAX could be just faked. Just thought Float::MAX was conceptually elegant. >>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. It's not a show stopper. Just thought a platform independent way of determining the numerical bounds would make the language more "complete" in some sense and be useful on occasion. Regards, Raja