Synopsis
#include <math.h>
double frexp(double x, int *exp);
Description
frexp breaks a floating-point number into a normalized fraction and an integral power of 2.
frexp stores power of two in the int object pointed to by exp and returns the value x, such that x has a magnitude in the interval [1/2, 1) or zero, and value equals x * 2^exp.
If x is zero, both parts of the result are zero.
IEC 60559 math library behavior
If x is ∞ or NaN, frexp returns x and stores zero into the int object pointed to by exp.
Portability
frexp conforms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).