From: Gregory Seidman Date: 2007-06-22T04:31:46+09:00 Subject: Re: Ruby doesn't know how to multiply On Fri, Jun 22, 2007 at 04:25:04AM +0900, rjprado@gmail.com wrote: > Hello, > > Dear friends, today I have stumbled into a really weird problem. Try > typing this on irb: > > 14.95 * 0.6 == 8.97 > > Ruby says it's false! > > I don't know if this is a bug. Please let me know. By the way i?m on > ruby 1.8.5. I'll give it a try on 1.8.6 and let you know. % irb >> "%2.40f" % (14.95 * 0.6) => "8.9699999999999988631316227838397026062012" >> "%2.40f" % 8.97 => "8.9700000000000006394884621840901672840118" http://en.wikipedia.org/wiki/Rounding_error > Thanks, > Roberto Prado. --Greg