Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ccosh.c « complex « mingwex « mingw « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8d304fd0e4355c5a72e3641820ce5630e0760e25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
   ccosh.c
   Contributed by Danny Smith
   2003-10-20
*/

#include <math.h>
#include <complex.h>

/* ccosh (x + I * y) = cosh (x) * cos (y)
    + I * (sinh (x) * sin (y)) */ 

double complex ccosh (double complex Z)
{
  double complex Res;
  __real__ Res = cosh (__real__ Z) * cos (__imag__ Z);
  __imag__ Res = sinh (__real__ Z) * sin (__imag__ Z);
  return Res;
}