From: pen Date: 2008-11-09T05:12:54+09:00 Subject: Re: what's easiest way to compare a Float & BigDecimal (i.e. like a equals mechanism) On Nov 8, 8:26 am, Greg Hauptmann wrote: > Hi, > > what's easiest way to compare a Float & BigDecimal (i.e. like a equals > mechanism)?  It seems that "==" does NOT work as they are different > types.  Is there a way to do a comparison without having to convert > types? Actually, there is none. Why don't you just let Ruby do the job and multiply the bigdecimal with 1.0 when comparing? Also, as previously noted, == operator with floats is not ... reliable. br, pen