std::exp2

From Cppreference

Jump to: navigation, search
Defined in header <cmath>

double      exp2( double n );
(C++11 feature)
float       exp2( float n );
(C++11 feature)
long double exp2( long double n );
(C++11 feature)

Computes 2 raised to the given power n

[edit] Parameters

n - floating point value

[edit] 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.

[edit] See also

exp
returns e raised to the given power (ex)
(function)
log
computes natural (base e) logarithm (to base e) (ln(x))
(function)
pow
raises a number to the given power (xy)
(function)