cc [ flag ... ] file ... -lm [ library ... ] #include <math.h>double exp(double x);
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.
The exp() function will fail if:
The result overflows.
The exp() function may fail if:
The result underflows.
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.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
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(3MP) for details.