[R] Question about converting from square roots to decimals and back
robert.barber at comcast.net
Sat Jan 20 20:00:18 CET 2007
I apologize if there is a simple answer to this question that I've
missed. I did search the mailing list but I might not have used the
right keywords. Why does sum(A3^2) give the result of 1, but
sum(A3^2)==1 give the result of FALSE?
> sum(A3^2)==1 # here's the part I don't understand
> sum(A3^2)^.5==1 # here's the part I don't understand
I realize that it has something to do with the conversion of the square
roots into decimals. But shouldn't it then give me some number other
than 1 as the result for sum(A3^2)? Are there other ways to do this
than what I've tried? I'm trying to confirm that A3 is a unit vector.
Thank you for your help.
More information about the R-help