sin - C complex.h

C examples for complex.h:sin

type

function template

From


<complex>
<complex.h>

Prototype

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

Description

Sine of complex

Parameters

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

Return value

Sine of x.

Demo Code


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

int main ()/*from   w  w  w .j  av  a  2s  . c o m*/
{
  std::complex<double> mycomplex (10.0,1.0);

  std::cout << "Real part: " << std::sin(mycomplex) << '\n';

  return 0;
}

Related Tutorials