Difference between revisions of "cpp/numeric/math/exp2"
From cppreference.com
(Created page with "'''std::exp2''' Defined in header <cmath> float exp2( float arg ); double exp2( double arg ); long double exp2( long double arg ); Compu...") |
(formatting) |
||
Line 1: | Line 1: | ||
− | + | {{cpp/title|exp2}} | |
+ | {{cpp/numeric/math/sidebar}} | ||
+ | {{ddcl list begin}} | ||
+ | {{ddcl list header | cmath}} | ||
+ | {{ddcl list item | notes={{mark c++11 feature}} | | ||
+ | double exp2( double n ); | ||
+ | }} | ||
+ | {{ddcl list item | notes={{mark c++11 feature}} | | ||
+ | float exp2( float n ); | ||
+ | }} | ||
+ | {{ddcl list item | notes={{mark c++11 feature}} | | ||
+ | long double exp2( long double n ); | ||
+ | }} | ||
+ | {{ddcl list end}} | ||
− | + | Computes 2 raised to the given power {{tt|n}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ===Parameters=== | |
+ | {{param list begin}} | ||
+ | {{param list item | n | floating point value}} | ||
+ | {{param list end}} | ||
− | + | ===Return value=== | |
− | + | ||
− | + | 2 raised to the {{tt|n}} (i.e. {{tt|2<sup>n</sup>}}) | |
− | 2 raised to the | + | |
If the result is too large for the underlying type, range error occurs and HUGE_VAL is returned. | If the result is too large for the underlying type, range error occurs and HUGE_VAL is returned. | ||
− | + | ===See also=== | |
− | + | ||
− | + | {{dcl list begin}} | |
− | + | {{dcl list template | cpp/numeric/math/dcl list exp}} | |
− | + | {{dcl list template | cpp/numeric/math/dcl list log}} | |
− | + | {{dcl list template | cpp/numeric/math/dcl list pow}} | |
− | + | {{dcl list end}} | |
− | + | ||
− | + |
Revision as of 04:42, 28 October 2011
Template:cpp/numeric/math/sidebar Template:ddcl list begin <tr class="t-dsc-header">
<td>Defined in header
</td>
<cmath>
<td></td> <td></td> </tr> <tr class="t-dcl ">
<td >double exp2( double n );
</td>
<td class="t-dcl-nopad"> </td> <td > Template:mark c++11 feature </td> </tr> <tr class="t-dcl ">
<td >float exp2( float n );
</td>
<td class="t-dcl-nopad"> </td> <td > Template:mark c++11 feature </td> </tr> <tr class="t-dcl ">
<td >long double exp2( long double n );
</td>
<td class="t-dcl-nopad"> </td> <td > Template:mark c++11 feature </td> </tr> Template:ddcl list end
Computes 2 raised to the given power n
Parameters
n | - | floating point value |
Return value
2 raised to the n
(i.e. 2n
)
If the result is too large for the underlying type, range error occurs and HUGE_VAL is returned.