exp(3M)
NAME
exp − exponential function
SYNOPSIS
cc [ flag ... ] file ... −lm [ library ... ]
#include <math.h>
double exp(double x);
DESCRIPTION
The exp() function computes the exponential of x, defined as ex.
RETURN VALUES
Upon successful completion, exp() returns the exponential of x.
If the correct value would cause overflow, exp() returns HUGE_VAL and sets errno to ERANGE.
If the correct value would cause underflow to zero, exp() returns 0 and may set errno to ERANGE.
If x is NaN, NaN is returned.
For exceptional cases, matherr(3M) tabulates the values to be returned as dictated by Standards other than XPG4.
ERRORS
The exp() function will fail if:
ERANGE The result overflows.
The exp() function may fail if:
ERANGE The result underflows.
USAGE
An application wishing to check for error situations should set errno to 0 before calling exp(). If errno is non-zero on return, or the return value is NaN an error has occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
| MT-Level | MT-Safe |
SEE ALSO
isnan(3M), log(3M), matherr(3M), mp(3M), attributes(5), standards(5)
NOTES
Prior to Solaris 2.6, there was a conflict between the pow () function in this library and the pow () function in the libmp library. This conflict was resolved by prepending mp_ to all functions in the libmp library. See mp(3M) for details.
SunOS 5.6 — Last change: 29 Dec 1996