exp2.3m (2010 09)
e
exp2(3M) exp2(3M)
NAME
exp2( ), exp2f( ), exp2l( ), exp2w( ), exp2q( ) - base-2 exponential functions
SYNOPSIS
#include <math.h>
double exp2(double x);
HP Integrity Server Only
float exp2f(float x);
long double exp2l(long double x);
extended exp2w(extended x);
quad exp2q(quad x);
DESCRIPTION
exp2() returns 2
x
.
Integrity System Only
exp2f() 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.
USAGE
To 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 VALUE
exp2(±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.
ERRORS
Integrity Server Only
If the correct value would overflow,
exp2() sets errno to [ERANGE].
HP-UX
libm functions on Integrity servers do not set errno by default. For errno setting, compile
with the +Olibmerrno option.
SEE ALSO
cbrt(3M), exp(3M), exp10(3M), expm1(3M), log2(3M), pow(3M), sqrt(3M), math(5).
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1