version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 6.1
year 2019
month 07
day 05
svn rev 76782
language R
version.string R version 3.6.1 (2019-07-05)
nickname Action of the Toes
Hi,
There's some weird numeric issue with the version above that I'm using.
I get FALSE for 0.06 + 0.01 == 0.07 but TRUE for 0.02 + 0.05 == 0.07.
Also, I get FALSE for 0.7 %in% seq(0.1, 1, 0.1). And I get the following:
c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1) == seq(0.1, 1, 0.1)
[1] TRUE TRUE FALSE TRUE TRUE TRUE FALSE TRUE TRUE TRUE
Only third and seventh give FALSE. Same with %in%:
c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1) %in% seq(0.1, 1, 0.1)
[1] TRUE TRUE FALSE TRUE TRUE TRUE FALSE TRUE TRUE TRUE
I am not the only one having this; my coworker sees the same issue with his rstudio.
Can someone please tell me what I'm missing here? Or is this a bug?