I'm trying to do something very simple: print a sequence of numbers using the seq() function. I entered the following:
seq(-.3, 1.2, .1)
Rather than 0.3, 0.2, 0.1, 0.0, etc.... I get the following:
[1] -3.000000e-01 -2.000000e-01 -1.000000e-01 5.551115e-17 1.000000e-01 2.000000e-01 3.000000e-01 4.000000e-01 5.000000e-01
[10] 6.000000e-01 7.000000e-01 8.000000e-01 9.000000e-01 1.000000e+00 1.100000e+00 1.200000e+00
Why is it giving me results in scientific notation? And why does it print 0.0 as 5.551115e-17? 5.551115e-17 does not equal 0.0, although it is close. Is there a way to fix this?