Everything

frexp / frexpf / frexpl


Breaks a floating-point number into a [0.5, 1.0) value and a power of 2.

[Format]

#include <math.h>

double frexp (double value, double long *exp);

float frexpf (float value, long * exp);

long double frexpl (long double value, long *exp);

[Parameters]

value Floating-point number to be broken into a [0.5, 1.0) value and a power of 2

exp Pointer to storage area that holds power-of-2 value

[Return values]

If value is 0.0: 0.0

If value is not 0.0: Value of ret defined by ret * 2value pointed to by exp = value

[Remarks]

The frexp function breaks value into a [0.5, 1.0) value and a power of 2. It stores the resultant power-of-2 value in the area pointed to by exp.

The frexp function returns the return value ret in the range [0.5, 1.0) or as 0.0.

If value is 0.0, the contents of the int storage area pointed to by exp and the value of ret are both 0.0.