std::scalbn, std::scalbln

From cppreference.com
< cpp‎ | numeric‎ | math
 
 
 
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
scalbnscalbln
(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)
(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       scalbn( float x, int exp );
(since C++11)
double      scalbn( double x, int exp );
(since C++11)
long double scalbn( long double x, int exp );
(since C++11)
double      scalbn( Integral x, int exp );
(since C++11)
float       scalbln( float x, long exp );
(since C++11)
double      scalbln( double x, long exp );
(since C++11)
long double scalbln( long double x, long exp );
(since C++11)
double      scalbln( Integral x, long exp );
(since C++11)

Multiplies an floating point value x by FLT_RADIX raised to power exp. On binary system it is equivalent to std::ldexp()

[edit] Parameters

arg - floating point value
exp - integer value

[edit] Return value

Returns x×FLT_RADIXexp.

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

[edit] See also

decomposes a number into significand and a power of 2
(function)
multiplies a number by 2 raised to a power
(function)