From: John W Kennedy Date: 2008-10-28T11:49:32+09:00 Subject: Re: float equality The Higgs bozo wrote: > guille lists wrote: >> I'm a bit lost here, shouldn't (0.1) and (1 - 0.9) be equals regarding >> the == operator? > > Nope. Floating-point is always inexact. What you mean is that binary floating point inexactly represents decimal fractions. > This is a computer thing, not > a Ruby thing. The issue applies to all languages everywhere which use > floating point. ...binary floating point. -- John W. Kennedy "I want everybody to be smart. As smart as they can be. A world of ignorant people is too dangerous to live in." -- Garson Kanin. "Born Yesterday"