Namespaces
Variants
Views
Actions

std::exp2

From cppreference.com
< cpp‎ | numeric‎ | math
Revision as of 05:40, 28 August 2013 by P12 (Talk | contribs)

 
 
 
 
Defined in header <cmath>
double      exp2( double n );
(since C++11)
float       exp2( float n );
(since C++11)
long double exp2( long double n );
(since C++11)
double      exp2( Integral n );
(since C++11)

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.

See also

(C++11)(C++11)
returns e raised to the given power (ex)
(function) [edit]
(C++11)(C++11)(C++11)
base 2 logarithm of the given number (log2(x))
(function) [edit]
(C++11)(C++11)
computes natural (base e) logarithm (ln(x))
(function) [edit]
(C++11)(C++11)
raises a number to the given power (xy)
(function) [edit]