Computes exponential, logarithm, and power functions.
IEEE Math Library (libm.a)
or
System V Math Library (libmsaa.a)
#include <math.h>
double exp ( x)
double x;
float expf (x) float x;
long double expl (x) long double x;
These subroutines are used to compute exponential, logarithm, and power functions.
The exp, expf, and expl subroutines returns exp (x).
An application wishing to check for error situations should set the errno global variable to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these subroutines. Upon return, if errno is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.
x | Specifies some double-precision floating-point value. |
y | Specifies some double-precision floating-point value. |
Upon successful completion, the exp, expf, and expl subroutines return the exponential value of x.
If the correct value would cause overflow, a range error occurs and the exp, expf, and expl subroutine returns the value of the macro HUGE_VAL, HUGE_VALF and HUGE_VALL, respectively.
If the correct value would cause underflow, and is not representable, a range error may occur, and either 0.0 (if supported), or an implementation-defined value is returned.
If x is NaN, a NaN is returned.
If x is ±0, 1 is returned.
If x is -Inf, +0 is returned.
If x is +Inf, x is returned.
If the correct value would cause underflow, and is representable, a range error may occur and the correct value is returned.
When using the libm.a library:
exp | If the correct value would overflow, the exp subroutine returns a HUGE_VAL value and the errno global variable is set to a ERANGE value. |
When using libmsaa.a(-lmsaa):
These error-handling procedures may be changed with the matherr subroutine when using the libmsaa.a library.
feclearexcept Subroutine, fetestexcept Subroutine, and class, _class, finite, isnan, or unordered Subroutines.
The matherr (matherr Subroutine)subroutine, sinh, cosh, or tanh subroutine.
Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.
128-Bit long double Floating-Point Format in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.
math.h in AIX 5L Version 5.2 Files Reference.