#include <math.h>
double frexp(double x, int *exp);
float frexpf(float x, int *exp);
frexp() splits a floating point number into mantissa and exponent. The relation is x = m * 2^exp. m always is normalized to the range 0.5 < m <= 1.0. The mantissa has the same sign as x.
The mantissa of x (the exponent is written to *exp). If x is 0.0, both the mantissa (the return value) and the exponent are 0.
ldexp() and ldexpf(), and