> x <- 1:9
> y <- x + 0.055000
> z <- round(y,2)
> cat(z)
1.05 2.06 3.06 4.05 5.05 6.05 7.05 8.05 9.05
On the numbers 2 and 3, it rounds up to 2.06 and 3.06. The other numbers round down to .05. I was wondering why? If I add 0.0550001 instead of 0.055000, everything rounds to .06.
This happens on both my Mac (Sierra) and PC (Win10/Edu). I run R 3.5.1 on both.
Thanks.