Namespaces
Variants
Views
Actions

std::ldexp

From cppreference.com
< cpp‎ | numeric‎ | math
Revision as of 22:18, 31 May 2013 by P12bot (Talk | contribs)

 
 
 
Common mathematical functions
Functions
Basic operations
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
Exponential functions
(C++11)
(C++11)
(C++11)
(C++11)
Power functions
(C++11)
(C++11)
Trigonometric and hyperbolic functions
(C++11)
(C++11)
(C++11)
Error and gamma functions
(C++11)
(C++11)
(C++11)
(C++11)
Nearest integer floating point operations
(C++11)(C++11)(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
Floating point manipulation functions
ldexp
(C++11)(C++11)
(C++11)
(C++11)
(C++11)(C++11)
(C++11)
Classification/Comparison
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Macro constants
(C++11)(C++11)(C++11)(C++11)(C++11)
 
Defined in header <cmath>
float       ldexp( float arg, int exp );
double      ldexp( double arg, int exp );
long double ldexp( long double arg, int exp );
double      ldexp( Integral arg, int exp );
(since C++11)

Multiplies an floating point value arg by 2 raised to power exp.

Parameters

arg - floating point value
exp - integer value

Return value

returns arg × 2exp

If the result is too large for the underlying type, range error occurs and HUGE_VAL is returned.

See also

decomposes a number into significand and a power of 2
(function) [edit]
(C++11)(C++11)
multiplies a number by FLT_RADIX raised to a power
(function) [edit]