exp, expf
Calculates the exponential.
double exp( double x ); float exp( float x ); // C++ only long double exp( long double x ); // C++ only float expf( float x );
Parameters
- x
-
Floating-point value.
The exp function returns the exponential value of the floating-point parameter, x, if successful. That is, the result is e to the power x, where e is the base of the natural logarithm. On overflow, the function returns INF (infinite) and on underflow, exp returns 0.
| Input | SEH Exception | Matherr Exception |
|---|---|---|
| ± QNAN,IND | None | _DOMAIN |
| ± ∞ | INVALID | _DOMAIN |
| x ≥ 7.097827e+002 | INEXACT+OVERFLOW | OVERFLOW |
| X ≤ -7.083964e+002 | INEXACT+UNDERFLOW | UNDERFLOW |
exp has an implementation that uses Streaming SIMD Extensions 2 (SSE2). See _set_SSE2_enable for information and restrictions on using the SSE2 implementation.
| Function | Required header | Compatibility |
|---|---|---|
| exp, expf | <math.h> | ANSI, Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
For additional compatibility information, see Compatibility in the Introduction.