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
________________________________________________________________
___ ___
l
ldexp(3M) ldexp(3M)
NAME
ldexp() - load exponent of a floating-point number
SYNOPSIS
#include <math.h>
double ldexp(double x, int exp);
DESCRIPTION
The ldexp() function computes the quantity x 2
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
Upon successful completion, the ldexp() function returns a double representing the value x multiplied
by 2 raised to the power exp.
If x is NaN, ldexp() returns NaN.
If the correct value after rounding would be smaller in magnitude than
MINDOUBLE, ldexp() returns
zero.
If the correct value would overflow,
ldexp() returns ±HUGE_VAL (according to the sign of x) and sets
errno to [ERANGE].
ERRORS
If ldexp() fails, errno is set to one of the following values.
[ERANGE] The correct value would overflow.
SEE ALSO
frexp(3M), modf(3M), scalb(3M), scalbn(3M),math(5), values(5).
STANDARDS CONFORMANCE
ldexp(): SVID3, XPG4.2, ANSI C
Section 3484 1 HP-UX Release 11i: December 2000
___
___