United States-English |
|
|
HP-UX Reference > Lldexp(3M)HP-UX 11i Version 3: February 2007 |
|
NAMEldexp(), ldexpf(), ldexpl(), ldexpw(), ldexpq() — scale exponent of a floating-point number DESCRIPTIONThe ldexp() function computes the quantity x* 2exp. ldexp() computes the same value as scalbn(). Integrity Server Onlyldexpf() is a float version of ldexp(); it takes a float first argument and returns a float result. ldexpl() is a long double version of ldexp(); it takes a long double first argument and returns a long double result. ldexpw() is an extended version of ldexp(); it takes a extended first argument and returns an extended result. ldexpq() is equivalent to ldexpl() on HP-UX systems. USAGETo use (for Integrity servers) ldexpf(), compile either with the default -Ae option or with the -Aa option. To use (for Integrity servers) ldexpl(), ldexpw(), or ldexpq(), compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. To use (for Integrity servers) ldexpw() or ldexpq(), compile also with the -fpwidetypes option. To use any of these functions, make sure your program includes <math.h>, and link in the math library by specifying -lm on the compiler or linker command line. For more information, see the HP-UX floating-point guide for HP Integrity servers at the following site: http://www.hp.com/go/fp. RETURN VALUEUpon successful completion, the ldexp() function returns x* 2exp. If x is ±INFINITY, zero, or a NaN, ldexp() returns x. ldexp() returns a properly signed infinity (equal to ±HUGE_VAL) in lieu of a value whose magnitude is too large, and raises the overflow and inexact exceptions. ldexp() raises the underflow and inexact exceptions whenever a result is tiny (essentially denormal or zero) and thereby suffers loss of accuracy, and may raise those exceptions if the result is merely tiny. |
Printable version | ||
|