Everything

frexp functions


[Syntax]

double frexp(double x, int *exp)

float frexpf(float x, int *exp)

long double frexpl(long double x, int *exp) [V2.01.00 or later]

[Description]

These functions divide x into a normalized number and an integral power of 2. They return the normalized number and store the integer in the int object pointed to by exp.

Assuming that the returned value is ret, it satisfies the following conditions.

-

0.5 <= |ret| < 1

-

x = ret * 2exp

 

[Special case]

Condition

Return value

Exception

x==0

0, *exp=0

-

x==±∞

NaN, *exp=0

EDOM

x==NaN

NaN, *exp=0

-