Where X = c(0.07825,-0.08177,0.00352), the numbers in X should sum to 0. Yet I get the following in R:
sum(X) 4.77049e-18
when I should get 0.
To re-edit my question, I think I understand why R does it, but what to do about it? In my particular case I need to input a matrix to a function (which I did not formulate) where all the rows sum to 0, otherwise the function will produce an error. Is there any way around this without editing the function?