FREXP(3) —
NAME
frexp, ldexp, modf − split into mantissa and exponent
SYNOPSIS
double frexp(value, eptr)
double value;
int ∗eptr;
double ldexp(value, exp)
double value, exp;
double modf(value, iptr)
double value, ∗iptr;
DESCRIPTION
Frexp returns the mantissa of value as a double quantity, x, of magnitude less than 1; x is less than 0.5 only if value is denormal.
Frexp also stores in ∗eptr an integer n such that value = x∗2n.
Ldexp returns the quantity value∗2exp by calling scalb with the same arguments.
Modf returns the fractional part of value and stores the integer part in ∗iptr.
DIAGNOSTICS
Frexp returns sign(x) ∗ 0.5 and stores 50000 in ∗eptr when x is infinite; it returns a NaN and stores 0 in ∗eptr when x is a NaN, and returns 0 and stores 0 in ∗eptr when x is 0.
Ldexp sets errno to ERANGE on overflow or underflow.
Modf returns 0 and stores x in ∗iptr when x is infinite; it returns x and stores x in ∗iptr when x is a NaN.
SEE ALSO
PRPQs 5799-WZQ/5799-PFF: IBM/4.3 — 15 Dec 1986