From ral64 at cam.ac.uk  Tue Apr 19 11:02:31 2011
From: ral64 at cam.ac.uk (Robert Lowe)
Date: Tue, 19 Apr 2011 10:02:31 +0100
Subject: [Rd] Dangerous Bug with IF function of R
In-Reply-To: <19885.17097.95228.926788@stat.math.ethz.ch>
References: <1303143161471-3457976.post@n4.nabble.com>
	<20110418172536.GB11313@cs.cas.cz>
	<1303150288440-3458300.post@n4.nabble.com>
	<19885.17097.95228.926788@stat.math.ethz.ch>
Message-ID: <C9F16187-169D-4771-B5C7-3FA9AD56848E@cam.ac.uk>


> 
> I'm intrigued. After such a blatantly wrong claim about a bug in
> R...  what exactly are you claiming about Matlab here?
> That it implements (software) decimal arithmetic on top of the
> cpu-internal binary arithmetic ?   probably rather not ...
> 

Just for confirmation the same thing doesn't work in MATLAB as one would expect.

i=0;
for j=1:11
i=i+0.1;
if i==1
i
end
end



[Rd] Dangerous Bug with IF function of R
Robert Lowe