Extracts the mantissa and exponent from a double precision number.
#include <math.h> float frexpf (num, exp) float num; int *exp; long double frexpl (num, exp) long double num; int exp; double frexp (num, exp) double num; int * exp;
The frexpf, frexpl, and frexp subroutines break a floating-point number num into a normalized fraction and an integral power of 2. The integer exponent is stored in the int object pointed to by exp.
num | Specifies the floating-point number to be broken into a normalized fraction and an integral power of 2. |
exp | Points to where the integer exponent is stored. |
For finite arguments, the frexpf, frexpl, and frexp subroutines return the value x, such that x has a magnitude in the interval [½ ,1) or 0, and num equals x times 2 raised to the power exp.
If num is NaN, a NaN is returned, and the value of *exp is unspecified.
If num is ±0, ±0 is returned, and the value of *exp is 0.
If num is ±Inf, num is returned, and the value of *exp is unspecified.
class, _class, finite, isnan, or unordered Subroutines and modf, modff, or modfl Subroutine
math.h in AIX 5L Version 5.2 Files Reference.