From: Chris Shea Date: 2007-04-12T06:20:10+09:00 Subject: Re: ruby rounding? On Apr 11, 2:25 pm, james.d.mast...@gmail.com wrote: > On Apr 11, 11:17 am, "Kyle Schmitt" wrote > > You could always create your own :). Here is a something that I put > together. There may be a better method. The weird thing in the code > with comparing the remainder to 1e-9 is to deal with floating point > precision issues. This may or may not be appropriate... I'm not a > rounding expert but it's worked in applications that I developed. I could be wrong, but I think this is what the constant Float::EPSILON is for. Where I'm sitting it's 2.22044604925031e-16. Chris