Dear All,
I am terribly confused by something at the moment. If anyone could tell me what they think the problem is that would be great.
As you can easily tell mathematically my definitions of a and b are identical. However when one runs the program a has the correct value stored, but b has the value M_PI.Code:#include<stdio.h> #include<math.h> int main() { double a=(sqrt(4*M_PI*M_PI+1)/2),b=(sqrt(M_PI*M_PI+1/4)); printf("a=%f\t\tb=%f",a,b); return(0); }
Thank you for all of your time.
Edz