Technical Support
On-Line Manuals
C166 User's Guide
#include <math.h> double pow ( double x, /* value to use for base */ double y); /* value to use for exponent */
The pow function calculates x raised to the yth power.
The pow function returns the value xy.
sqrt
#include <math.h> #include <stdio.h> /* for printf */ void tst_pow (void) { float base; float power; float y; base = 2.0; power = 8.0; y = pow (base, power); /* y = 256 */ printf ("%f ^ %f = %f\n", base, power, y); }