std::frexp - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::frexp

From cppreference.com
< cpp‎ | numeric‎ | math

Defined in header `<cmath>` |  |
float frexp( float x, int* exp ); |  |
double frexp( double x, int* exp ); |  |
long double frexp( long double x, int* exp ); |  |
double frexp( Integral x, int* exp ); |  | (since C++11)

Decomposes given floating point value `x` to significand and exponent.

### [edit] Parameters

x | - | 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) [edit]
logb (C++11) | extracts exponent of the number (function) [edit]
ilogb (C++11) | extracts exponent of the number (function) [edit]
modf | decomposes a number into integer and fractional parts (function) [edit]
C documentation for frexp

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/numeric/math/frexp&oldid=70493"