I am trying to calculate coordinate transformations and in the process of debugging my code using debug I found the following
Browse[1]> direction[i] [1] -1.570796 Browse[1]> cos(direction[i]) [1] 6.123032e-17 Browse[1]> cos(-1.570796) [1] 3.267949e-07 Browse[1]> direction[i] [1] -1.570796 Browse[1]> cos(direction[i]) [1] 6.123032e-17 Browse[1]> cos(-1.570796) [1] 3.267949e-07 Browse[1]> x<-direction[i] Browse[1]> x [1] -1.570796 Browse[1]> cos(x) [1] 6.123032e-17 I am not sure why I am getting one values when I am using a variable that stores the value and another when I use the value directly. Am I missing something here? Can someone comment? Thanks ../Murli ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.