pow
From cppreference.com
Defined in header <math.h>
|
||
float powf( float base, float exp );
|
(since C99) | |
long double powl( long double base, long double exp );
|
(since C99) | |
Computes the value of base
raised to the power exp
or iexp
.
[edit] Parameters
base | - | base as floating point value |
exp | - | exponent as floating point value |
iexp | - | exponent as integer value |
[edit] Return value
base
raised by power (exp
or iexp
).
Domain error occurs if base
is 0 and exp
is less than or equal to 0. NAN is returned in that case.
Domain error occurs if base
is negative and exp
is not an integer value. NAN is returned in that case.
Range error occurs if an overflow takes place. HUGEVAL is returned in that case.
[edit] See also
returns e raised to the given power (ex) (function) |
|
computes natural (base e) logarithm (to base e) (ln(x)) (function) |
|
computes square root (√x) (function) |
|
(C99)
|
computes cubic root (3√x) (function) |