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

cacoshl.c « complex « mingwex « mingw « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7f482c409b40bf7f4de586b80e1175b89131df39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
   cacoshl.c
   Contributed by Danny Smith
   2005-01-04
*/

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

#if 0
/* cacosh (z) = I * cacos (z)  */
long double complex cacoshl (long double complex Z)
{
  long double complex Tmp;
  long double complex Res;

  Tmp = cacosl (Z);
  __real__ Res = -__imag__ Tmp;
  __imag__ Res = __real__ Tmp;
  return Res;
}

#else

/* cacosh (z) = I * cacos (z) = I * (pi/2 - casin (z))  */
#ifndef _M_PI_2L
#define _M_PI_2L 1.5707963267948966192313L
#endif
long double complex cacoshl (long double complex Z)
{
  long double complex Tmp;
  long double complex Res;

  Tmp = casinl (Z);
  __real__ Res = __imag__ Tmp;
  __imag__ Res =  _M_PI_2L - __real__ Tmp;
  return Res;
}
#endif