From: Ohad Lutzky Date: 2006-05-25T14:08:40+09:00 Subject: Re: greatest float smaller than 1.0? Pardon, you were looking for the other direction :) Ohad Lutzky wrote: > polypus wrote: >> thanks everyone for your advice > > By the way, the problem in your question lies with calculus. Fact is, in > reality, there IS no 'greatest real number smaller than 1'. (not even > for rational numbers). Here's proof: Say someone gives you a number x > which they claim is such a number. Then consider > > h = (1 - x) / 2 > > h is greater than x, but still smaller than 1. So you can always keep > getting closer to 1, and no number will be 'greatest'. > > As such, the answer you got from everyone was 'what is the greatest > number that my computer will CONSIDER to be smaller than one'? And that > depends on your computer. This is why the Epsilon answer works best. -- Posted via http://www.ruby-forum.com/.