frexp
, frexpf
---split floating-point number#include <math.h> double frexp(double val, int *exp); float frexpf(float val, int *exp);Description
frexp
represents the double val as a mantissa m
and a power of two p. The resulting mantissa will always
be greater than or equal to 0.5
, and less than 1.0
(as
long as val is nonzero). The power of two will be stored
in *
exp.
frexpf
is identical, other than taking and returning
floats rather than doubles.
Returns
frexp
returns the mantissa m. If val is 0
, infinity,
or Nan, frexp
will set *
exp to 0
and return val.
Portability
frexp
is ANSI.
frexpf
is an extension.