Why does an exact sequence that's supposed to traverse 0
have some small float instead? For instance, seq(-0.6, 0.6, by = 0.2)
returns
[1] -6.000000e-01 -4.000000e-01 -2.000000e-01 1.110223e-16 2.000000e-01
[6] 4.000000e-01 6.000000e-01
.
This doesn't always happen, either (by = 0.3
with the same from
and to
is fine).
What is going on, and how do I prevent it from happening?