Guardian C Library Calls Reference Manual

exp
3-32 128833Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
exp
The exp function computes the exponential function (base e) of its argument.
expr
is an expression of type double, specifying the power to which e is raised.
Return Value
is the exponential (e raised to the power) of expr, expressed as a double value. If the
computation causes an overflow or underflow, exp returns the value HUGE_VAL or
the value zero, respectively. In these cases, exp also sets errno to ERANGE (a range
error).
Example
This example prints “e raised to the power 1 is 2.718282.
#include <mathh>
#include <stdioh>
int main(void)
{
double r, x;
x = 1.0;
r = exp(x);
printf("e raised to the power 1 is %f.", r);
}
#include <mathh>
double exp(double expr);