can some one show me an example of the pow() function for linux and windows.. please i cant really understand it in the man page.. thanx
can some one show me an example of the pow() function for linux and windows.. please i cant really understand it in the man page.. thanx
double pow(double x, double y);
it raises x to the y power
pow(2,10) == 1024.0
pow(2,0) == 1.0
pow(10,2) - 100.0 < 0.00001
the last one shows the problems of comparing floats.
ok but how would i enter that in to a code... that is what i mean.. sorry but i learn by example.. i know to know how the code is inputed so i know how to work with it.. thanx hope you understand
Originally posted by xlordt
ok but how would i enter that in to a code... that is what i mean.. sorry but i learn by example.. i know to know how the code is inputed so i know how to work with it.. thanx hope you understandCode:#include <math.h> int main(void) { double p; p = pow(10, 2); printf("pow(10,2) = %f\n", p); return 0; }