Copyright © 1997 The Open Group

exp - exponential function

`#include <math.h> double exp(double`

x);

Theexp()function computes the exponent ofx,defined ase^{x}.An application wishing to check for error situations should set

errnoto 0 before callingexp(). Iferrnois non-zero on return, or the return value is NaN, an error has occurred.

Upon successful completion,exp()returns the exponential value ofx.If the correct value would cause overflow,

exp()returns HUGE_VAL and setserrnoto [ERANGE].If the correct value would cause underflow,

exp()returns 0 and may seterrnoto [ERANGE].If

xis NaN, NaN is returned anderrnomay be set to [EDOM].

Theexp()function will fail if:

- [ERANGE]
- The result overflows.
The

exp()function may fail if:

- [EDOM]
- The value of
xis NaN.- [ERANGE]
- The result underflows.
No other errors will occur.

None.

None.

None.

isnan(),log(),<math.h>.

Derived from Issue 1 of the SVID.

Copyright © 1997 The Open Group

[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]