Skip to content

frexp, frexpf : split floating-point number

#include <math.h>
double frexp(double val, int *exp);
float frexpf(float val, int *exp);
```### Description
All non zero, normal numbers can be described as m * 2**p. 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.
---
**Authoritative source**: BUSMASTER DITA help source `frexp.dita`, compiled into `BUSMASTER.CHM` with the application.