exp - C complex.h

C examples for complex.h:exp

type

function template

From


<complex>
<complex.h>

Prototype

template<class T> 
complex<T> exp (const complex<T>& x);

Description

Exponential of complex

Parameters

Parameter Description
x Complex value.

Return value

Exponential of x.

Demo Code

#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;
}

Related Tutorials