tan - C complex.h

C examples for complex.h:tan

type

function template

from

<complex>
<complex.h>

Prototype

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

Description

Tangent of complex

Parameters

Parameter Description
x Complex value, representing an angle expressed in radians.

Return value

Tangent of x.

Demo Code


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

int main ()// ww  w .jav  a  2  s  . co m
{
  std::complex<double> mycomplex (10.0,1.0);

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

  return 0;
}

Related Tutorials