[R] numeric not equal its value

Jannis bt_jannis at yahoo.de
Mon May 20 14:36:47 CEST 2013

Dear R users,

I ran into the strange situation where a number does not seem to equal 
its value. Try this:

a <- seq(0.05,0.7,0.05)[3]

b <- 0.15

a == b

Should this not be TRUE? a-b yields a very small number (and not 0) so 
this most probably is a numerical error, but why does seq create such 

Thanks a lot

More information about the R-help mailing list