17. frexp() and ldexp()

From the man pages for frexp() and ldexp():
#include <math.h>

double frexp(double x, int *exp);
float frexpf(float x, int *exp);
long double frexpl(long double x, int *exp);

The frexp() function is used to split the number x into a normalized fraction
and an exponent which is stored in exp.

The frexp() function returns the normalized fraction. If the argument x
is not zero, the normalized fraction is x times a power of two, and its
absolute value is always in the range 1/2 (inclusive) to 1 (exclusive),
that is, [0.5,1).

---

double ldexp(double x, int exp);
float ldexpf(float x, int exp);
long double ldexpl(long double x, int exp);

The ldexp() function returns the result of multiplying the floating-point
number x by 2 raised to the power exp.