std::frexp

From Cppreference

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

float       frexp( float x, int *exp );

double      frexp( double x, int *exp );

long double frexp( long double x, int *exp );

Decomposes given floating point value to significand and exponent.

[edit] Parameters

arg - floating point value
exp - pointer to integer value to store the exponent to

[edit] Return value

significand of the given floating point number in the range of [0.5; 1). The exponent is put into integer value pointed to by exp.

[edit] See also

ldexp
multiplies a number by 2 raised to a power
(function)
modf
decomposes a number into integer and fractional parts
(function)