Possible Duplicate:
C programming sqrt function
i'm facing a weird problem in C. I've included the library in the header, and for example the pow(x,n)
function works as well.
On the other hand ,the next code does does not run at all:
float calcArea(double edgeA){
double s=edgeA;
float area = sqrt(s);
return area;
}
But when I change sqrt(s)
to sqrt(45)
(or any other natural number) it doesn't make any problem.
I've also checked the sqrt()
function more few times, and it's still doesn't as long as the argument is a variable.
Any suggestion for solving this problem will be helpful, Thanks in advance
EDIT : I'm using Eclipse