Important: The information in this document is obsolete and should not be used for new development.
exp
You can use theexpfunction to raise e to some power.
double_t exp (double_t x);
x- Any floating-point number.
DESCRIPTION
Theexpfunction performs the exponential function on its argument.
The
logfunction performs the inverse operation .EXCEPTIONS
When x is finite and nonzero, the result of might raise the following exceptions:
- inexact (for all finite, nonzero values of x)
- overflow (if the result is outside the range of the data type)
- underflow (if the result is inexact and must be represented as a denormalized number or 0)
SPECIAL CASES
Table 10-7 shows the results when the argument to theexpfunction is a zero, a NaN, or an Infinity.
Special cases for the expfunctionOperation Result Exceptions raised +1 None +1 None NaN None[28] + ![]()
None +0 None EXAMPLES
z = exp(0.0); /* z = e0 = 1. */ z = exp(1.0); /* z = e12.71828128 . . . The inexact exception is raised. */
[28] If the NaN is a signaling NaN, the invalid exception is raised.