From: Tim Pease Date: 2008-10-28T05:40:27+09:00 Subject: Re: float equality On Oct 27, 2008, at 2:29 PM, Bilyk, Alex wrote: > Mathematically 1.(0) is the same thing as 0.(9). Computers simply > represent this to whatever precision they can. > Hmmm ... my humor is a little to obtuse today. I was hoping the word "precisely" would cause a mental link to the word "precision" which is what this problem is all about -- precision and computer representations of floating point values. Alas. I'll stick with my day job of writing software. Blessings, TwP > -----Original Message----- > From: Tim Pease [mailto:tim.pease@gmail.com] > Sent: Monday, October 27, 2008 1:11 PM > To: ruby-talk ML > Subject: Re: float equality > > On Mon, Oct 27, 2008 at 11:09 AM, Todd Benson > wrote: >> >> Totally off-topic, but has any one figured out exactly why 1/9 >> (0.111...) plus 8/9 (0.888...) is 1 instead of 0.999... :-) >> > > I figured it out once, but I can't remember precisely how it worked. > > TwP > >