HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
f
frexp(3M) frexp(3M)
NAME
frexp() - extract mantissa and exponent from double-precision number
SYNOPSIS
#include <math.h>
double frexp(double num, int *exp);
DESCRIPTION
The frexp() function breaks a floating-point number into a normalized fraction and an integral power of
2. It stores the integer exponent in the int object pointed to by exp.
To use this function, make sure your program includes <math.h>, and link in the math library by specify-
ing -lm on the compiler or linker command line.
RETURN VALUE
The frexp() function returns the value x, such that x is a double with magnitude in the interval [0.5,
1] or zero, and num equals x times 2 raised to the power *exp.
If num is zero, both parts of the result are zero.
If num is NaN, frexp() returns NaN, and the value of *exp is unspecified.
If num is ±INFINITY,
frexp() returns num, and the value of *exp is unspecified.
ERRORS
No errors are defined.
SEE ALSO
ldexp(3M), modf(3M), scalb(3M), scalbn(3M),math(5).
STANDARDS CONFORMANCE
frexp(): SVID3, XPG4.2, ANSI C
HP-UX Release 11i: December 2000 − 1 − Section 3−−257
___
___