The math library function pow doesn work with integers. Why not?
All math library functions return type double. You will need to “cast” to get things to work. I get imprecise results when doing arithmetic with floats and doubles. For example, the statement printf(“%f”, 3.0 * 1.0 / 3.0); might print out 0.999999 instead of 1.000000. Floating point arithmetic is not done exactly. The computer stores the numbers in binary, so do not be surprised to see roundoff error. This can be especially troublesome when you are trying to compare a very tiny number with 0.0. You should write code that does not depend on such roundoff imprecision. It is possible to write an ADT to work with arbitrary precision; however, doing arbitrary precision arithmetic will be significantly slower than with the built-in float and double types. I get the following warning when I compile my program, even though I never use a variable of type double. hello.c:28: warning: passing arg 3 of ‘f’ as ‘float’ rather than ‘double’ due to prototype In C, float and char variables are treated