From: Adam Prescott Date: 2011-09-18T12:08:13+09:00 Subject: Re: Strange vector behaviour On Sun, Sep 18, 2011 at 3:26 AM, thomas Mulvaney wrote: > Vector[1.1,2.2,3.3] == Vector[1,2,3]*1.1 > #=> false > > Returns false which shouldn't be the case. > > Any ideas whats going on? > Floating point numbers. => Vector[1,2,3]*1.1 >> Vector[1.1, 2.2, 3.3000000000000003] Basically, whenever you're comparing equality of floats, you should stop and think what you're doing. (Less basic: http://download.oracle.com/docs/cd/E19957-01/806-3568/ncg_goldberg.html )