Possible Duplicate:
Why are these numbers not equal?
The following R code is part of a bigger function, and it keeps skipping the if statements and just doing the else statement at the end. Any suggestions? thanks
if(solv==0){
theta<-pi/2
} else if(solv==1){
theta<-0
} else if(solv==-1) {
theta<-pi
} else{
comb<-top/bottom
theta<-acos(comb)}