cosh - C complex.h

C examples for complex.h:cosh

type

function template

From


<complex>
<complex.h>

Prototype

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

Description

Hyperbolic cosine of complex

Parameters

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

Return value

Hyperbolic cosine of x.

Demo Code

#include <iostream>
#include <complex>

int main ()//  w  ww.  j ava  2 s  .c  o  m
{
  std::complex<double> mycomplex (10.0,2.0);

  std::cout << "The Hyperbolic cosine of " << mycomplex << " is " << std::cosh(mycomplex) << '\n';

  return 0;
}

Related Tutorials