[Rd] BUG in " == " ? (PR#9065)

eric.durand at imag.fr eric.durand at imag.fr
Fri Jul 7 11:50:44 CEST 2006


Hello,
here is the version of R that I use :

> version
               _
platform       i486-pc-linux-gnu
arch           i486
os             linux-gnu
system         i486, linux-gnu
status
major          2
minor          3.1
year           2006
month          06
day            01
svn rev        38247
language       R
version.string Version 2.3.1 (2006-06-01)

And here is one of the sequences of isntruction that returns an abberation : 

> x<-seq(0,1,by=0.01)
> x[71]
[1] 0.7
> which(x == 0.7)
numeric(0)
> x[71] == 0.7
[1] FALSE

Or another version of (maybe) the same bug : 

> x <- 70
> x == 70
[1] TRUE
> x <- x*0
> x <- 70
> x == 70
[1] TRUE
> x<-x*0.01
> x
[1] 0.7
> x == 0.7
[1] FALSE

It seems completely strange ... any help would be greatly appreciated :)

Regards,
Eric Durand



More information about the R-devel mailing list