C examples for complex.h:exp
function template
<complex> <complex.h>
template<class T> complex<T> exp (const complex<T>& x);
Exponential of complex
Parameter | Description |
---|---|
x | Complex value. |
Exponential of x.
#include <iostream> #include <complex> int main ()/*from w w w . j a va2 s. co m*/ { std::complex<double> mycomplex (10.0,2.0); std::cout << "The Exponential of " << mycomplex << " is " << std::exp(mycomplex) << '\n'; return 0; }