From: "Peña, Botp" Date: 2007-09-05T10:02:05+09:00 Subject: Re: 0.06 == 0.06 returns false in Ruby? From: Michael Ulm [mailto:michael.ulm@isis-papyrus.com] # However (among other problems): # > x = (1.0/3.0).to_dec foul.. ^^^^^^^^^ is a float op and not a bigdecimal/to_dec. use atomic operations comparison, pls :) # > y = 1.0.to_dec / 3.0.to_dec that is more like it # > x == y # => false of course. so consider eg, irb(main):057:0> x = 1.0.to_dec / 3.0.to_dec => # irb(main):058:0> y = 2.0.to_dec / 6.0.to_dec => # irb(main):059:0> x == y => true kind regards -botp