frexp

Calculates the mantissa and exponent of a floating point number.

double frexp (double x, int * pw2);

Required Header
<math.h>

Return Value

This function returns the mantissa.

Parameters

x

  The value to convert

pw2

  A pointer to the stored exponent

Remarks

The frexp function returns the mantissa of x such that its value is between 0.5 and 1.0, where x = mantissa * 2^pw2 which is stored at the location specified by pw2.

If x is 0.0, then both the return value and the value stored at pw2 is 0.0

Mathematics

See Also    ldexp, modf