| Types and the imaginary constant | |||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||
| Manipulation | |||||||||||||||||||||||||||||||
| Power and exponential functions | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
| Trigonometric functions | |||||||||||||||||||||||||||||||
| Hyperbolic functions | |||||||||||||||||||||||||||||||
Defined in header <complex.h> | ||
| (1) | (since C99) | |
| (2) | (since C99) | |
| (3) | (since C99) | |
Defined in header <tgmath.h> | ||
#define exp( z ) | (4) | (since C99) |
z.z has typelongdoublecomplex,cexpl is called. ifz has typedoublecomplex,cexp is called, ifz has typefloatcomplex,cexpf is called. Ifz is real or integer, then the macro invokes the corresponding real function (expf,exp,expl). Ifz is imaginary, the corresponding complex argument version is called.Contents |
| z | - | complex argument |
If no errors occur,e raised to the power ofz,\(\small e^z\)ez
is returned.
Errors are reported consistent withmath_errhandling.
If the implementation supports IEEE floating-point arithmetic,
z is±0+0i, the result is1+0iz isx+∞i (for any finite x), the result isNaN+NaNi andFE_INVALID is raised.z isx+NaNi (for any finite x), the result isNaN+NaNi andFE_INVALID may be raised.z is+∞+0i, the result is+∞+0iz is-∞+yi (for any finite y), the result is+0cis(y)z is+∞+yi (for any finite nonzero y), the result is+∞cis(y)z is-∞+∞i, the result is±0±0i (signs are unspecified)z is+∞+∞i, the result is±∞+NaNi andFE_INVALID is raised (the sign of the real part is unspecified)z is-∞+NaNi, the result is±0±0i (signs are unspecified)z is+∞+NaNi, the result is±∞+NaNi (the sign of the real part is unspecified)z isNaN+0i, the result isNaN+0iz isNaN+yi (for any nonzero y), the result isNaN+NaNi andFE_INVALID may be raisedz isNaN+NaNi, the result isNaN+NaNiwhere\(\small{\rm cis}(y)\)cis(y) is\(\small \cos(y)+{\rm i}\sin(y)\)cos(y) + i sin(y)
The complex exponential function\(\small e^z\)ez
for\(\small z = x + {\rm i}y\)z = x+iy equals\(\small e^x {\rm cis}(y)\)ex
cis(y), or,\(\small e^x (\cos(y)+{\rm i}\sin(y))\)ex
(cos(y) + i sin(y))
The exponential function is anentire function in the complex plane and has no branch cuts.
Output:
exp(i*pi) = -1.0+0.0i
(C99)(C99)(C99) | computes the complex natural logarithm (function)[edit] |
(C99)(C99) | computese raised to the given power (\({\small e^x}\)ex) (function)[edit] |
C++ documentation forexp | |