C examples for math.h:exp2
function
<cmath> <ctgmath> <math.h>
Returns the base-2 exponential function of x, which is 2 raised to the power x: 2^x.
long double exp2l (long double x); long double exp2 (long double x); double exp2 (double x); float exp2f (float x); float exp2 (float x); double exp2 (T x);
Parameter | Description |
---|---|
x | Value of the exponent. |
2 raised to the power of x.
#include <stdio.h> #include <math.h> /* exp2 */ int main ()// w w w. j a v a2 s .c om { double param = 8.0; double result = exp2 (param); printf ("2 ^ %f = %f.\n", param, result ); return 0; }