Namespaces
Variants
Views
Actions

pow

From cppreference.com
< c‎ | numeric‎ | math
Revision as of 18:19, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)(C99)(C99)
Exponential functions
(C99)
(C99)
(C99)
(C99)
Power functions
(C99)
(C99)
pow
Trigonometric and hyperbolic functions
(C99)
(C99)
(C99)
Error and gamma functions
(C99)
(C99)
(C99)
(C99)
Nearest integer floating point operations
(C99)(C99)(C99)
(C99)
(C99)(C99)(C99)
Floating point manipulation functions
(C99)(C99)
(C99)
(C99)
Classification
(C99)
(C99)
(C99)
Macro constants
 

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <math.h>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td >
float       powf( float base, float exp );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
double      pow( double base, double exp );
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">

<td >
long double powl( long double base, long double exp );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> Template:ddcl list end

Computes the value of base raised to the power exp or iexp.

Parameters

base - base as floating point value
exp - exponent as floating point value
iexp - exponent as integer value

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.

See also

Template:c/numeric/math/dcl list expTemplate:c/numeric/math/dcl list logTemplate:c/numeric/math/dcl list sqrtTemplate:c/numeric/math/dcl list cbrt