tanh - C complex.h

C examples for complex.h:tanh

type

function template

From


<complex>
<complex.h>

Description

Hyperbolic tangent of complex

Prototype

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

Parameters

Parameter Description
xComplex value, representing an angle expressed in radians.

Return value

Hyperbolic tangent of x.

Demo Code


#include <iostream> // std::cout
#include <complex> // std::complex, std::real

int main ()//from   www .j a  va 2 s  .  com
{
  std::complex<double> mycomplex (10.0,1.0);

  std::cout << std::tanh(mycomplex) << '\n';

  return 0;
}

Related Tutorials