Extracts the mantissa and exponent from a double precision number.
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.
Item | Description |
---|---|
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.