Hi,

I'm having a bit trouble with this equation:

sum = pow(cos(x),2) + pow(cos(y),2);
z = acos ( sqrt ( 1 - sum ) );

so when sum == 1, it should be sqrt(1-1) i.e. sqrt(0) which should be 0..

however I get an error as .. Nan..

a little help please.. how do i tell c++ that it is 0 not -0