exp, _expl

Description

Calculate the exponential.

#include <math.h>

double exp( double x );

long double _expl( long double x );

x Floating-point value  

Remarks

The exp and _expl functions return the exponential function of their floating-point arguments (x).

The _expl function is the 80-bit counterpart; it uses an 80-bit, 10-byte coprocessor form of arguments and return values. See the reference page on the long double functions for more details on this data type.

Return Value

These functions return ex. The functions return HUGE_VAL on overflow and set errno to ERANGE; on underflow, they return 0 but do not set errno. This behavior can be changed with the _matherr function.

Compatibility

exp

Standards:ANSI, UNIX

16-Bit:DOS, QWIN, WIN, WIN DLL

32-Bit:DOS32X

_expl

Standards:None

16-Bit:DOS, QWIN, WIN, WIN DLL

32-Bit:None

See Also

log functions

Example

/* EXP.C */

#include <math.h>

#include <stdio.h>

void main( void )

{

double x = 2.302585093, y;

y = exp( x );

printf( "exp( %f ) = %f\n", x, y );

}

Output

exp( 2.302585 ) = 10.000000