help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 0.3*3 == 0.9?


From: José Luis García Pallero
Subject: Re: 0.3*3 == 0.9?
Date: Thu, 26 Aug 2010 00:10:40 +0200

> I thought that comparison of floats returned true if the difference was less
> than machine precision. I don't recall if there ever was any basis for that
> belief, though. I guess that I don't really understand what is the
> usefulness of allowing == to operate on floats. Does Matlab work the same
> way?
> Cheers,
> Michael

Yes, MatLab do the same as Octave. On MatLab 7.6.0 (R2008a) for linux 64 bits

>> 0.3*3==0.9
ans =
     0

-- 
*****************************************
José Luis García Pallero
address@hidden
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************



reply via email to

[Prev in Thread] Current Thread [Next in Thread]