# Re: greatest float smaller than 1.0?

**URL:** <https://www.ruby-forum.com/t/re-greatest-float-smaller-than-1-0/94941>\
**Category:** Ruby\
**Created:** [May 18, 2006, 12:11am UTC](https://www.ruby-forum.com/t/re-greatest-float-smaller-than-1-0/94941 "2006-05-18T00:11:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 18, 2006, 12:11am UTC](https://www.ruby-forum.com/t/re-greatest-float-smaller-than-1-0/94941/1 "2006-05-18T00:11:59Z")

</div>

If you look into some numerics book , like the one by Stoer and  
Burlisch,  
they introduce a convention of an epsilon as the smallest positive  
number  
that a computer can store.  
This is of course machine/implementation dependent. I have tried to  
find  
whether there is a common Ruby definition - but I didn’t find anything,  
maybe because Ruby introduces BigFloats along the way automatically.  
In any case, this epsilon will be a power of 2.  
On my machine, Float::EPSILON is 2\*\*(-52).

(Just type in

Float::EPSILON

at irb).

Your computer can only represent integer multiples of that number as  
floats, so there are all sorts of rounding errors in arithmetic - see  
Stoer  
and Burlisch  
or \_[http://www.javaworld.com/javaworld/jw-10-1996/jw-10-hood.html\_](http://www.javaworld.com/javaworld/jw-10-1996/jw-10-hood.html_)  
([http://www.javaworld.com/javaworld/jw-10-1996/jw-10-hood.html](http://www.javaworld.com/javaworld/jw-10-1996/jw-10-hood.html)) .

Best regards,

Axel
