United States-English |
|
|
HP-UX Reference > Eexp2(3M)HP-UX 11i Version 3: February 2007 |
|
NAMEexp2(), exp2f(), exp2l(), exp2w(), exp2q() — base-2 exponential functions DESCRIPTIONexp2() returns 2x. Integrity System Onlyexp2f() is a float version of exp2(); it takes a float argument and returns a float result. exp2l() is a long double version of exp2(); it takes a long double argument and returns a long double result. exp2w() is an extended version of exp2(); it takes an extended argument and returns an extended result. exp2q() is equivalent to exp2l() on HP-UX systems. USAGETo use these functions, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. To use (for Integrity servers) exp2w() or exp2q(), compile also with the -fpwidetypes option. To use 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 VALUEexp2(±0) returns 1. If x is +INFINITY, exp2() returns +INFINITY. If x is -INFINITY, exp2() returns zero. If x is NaN, exp2() returns NaN. exp2() returns infinity (equal to HUGE_VAL) in lieu of a value whose magnitude is too large, and raises the overflow and inexact exceptions. exp2() 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. exp2() raises the inexact exception whenever a rounded result does not equal the mathematical result. |
Printable version | ||
|