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

exponential functions 

Function


SYNOPSIS

#include <math.h>

double exp(double x)

double exp2(double x)

float expf(float x)

float exp2f(float x)

double expm1(double x)

float expm1f(float x)


DESCRIPTION

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

The exp2() and exp2f() functions compute the base 2 exponential of the given argument x.

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 exp2() function returns 2x.

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

exp2() and expm1(): ANSI/ISO 9899:1999 'ISO C99'.

expf(), expm1f(): PTC 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

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


SEE ALSO

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


PTC MKS Toolkit 10.5 Documentation Build 40.