exp(), expf(), expm1(), expm1f()

exponential functions 

Function


SYNOPSIS

#include <math.h>

double exp(double x)

float expf(float x)

double expm1(double x)

float expm1f(float x)


DESCRIPTION

The exp() function computes the exponent of x, ex.

The expm1() function returns ex-1.0.

To check for error situations, set errno to 0 before calling exp(). If errno is non-zero on return, or the return value is NaN, an error has occurred.

The expf() and expm1f() functions are single-precision versions of exp() and expm1().


PARAMETERS

x 

Is a floating point value.


RETURN VALUES

The exp() function returns ex.

The expm1() function returns ex-1.0.

If the return value would overflow, one of the following occurs:

If the return value would underflow, 0.0 is returned and:

If x is NaN, NaN is returned.


CONFORMANCE

exp(): ANSI/ISO 9899-1990

expm1(): UNIX 98.

expf(), expm1f(): MKS Toolkit UNIX APIs extension


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

At high levels of compiler optimizations, the hardware handles the exp() function intrinsically. In such cases, mathematical exceptions do not cause the matherr() function to be called or the errno value to be set.


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
log10(), math(), pow(), sqrt()


MKS Toolkit 9.2 Documentation Build 16.