2
* This file has no copyright assigned and is placed in the Public Domain.
3
* This file is part of the w64 mingw-runtime package.
4
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
8
Contributed by Danny Smith
16
/* cacos (Z) = -I * clog(Z + I * csqrt(1 - Z * Z)) */
18
long double complex cacosl (long double complex Z)
20
long double complex Res;
28
__real__ Res = acosl (x);
34
long double complex ZZ;
35
/* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
36
/* caculate 1 - Z * Z */
37
__real__ ZZ = 1.0L - (x - y) * (x + y);
38
__imag__ ZZ = -2.0L * x * y;
43
/* calculate ZZ + I * sqrt (ZZ) */
45
__real__ ZZ = x - __imag__ Res;
46
__imag__ ZZ = y + __real__ Res;
52
__real__ Res = __imag__ ZZ;
53
__imag__ Res = - __real__ ZZ;
60
/* cacos ( Z ) = pi/2 - casin ( Z ) */
62
#define _M_PI_2L 1.5707963267948966192313L
64
long double complex cacosl (long double complex Z)
66
long double complex Res = casinl (Z);
67
__real__ Res = _M_PI_2L - __real__ Res;
68
__imag__ Res = - __imag__ Res;
2
* This file has no copyright assigned and is placed in the Public Domain.
3
* This file is part of the w64 mingw-runtime package.
4
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
8
Contributed by Danny Smith
16
/* cacos (Z) = -I * clog(Z + I * csqrt(1 - Z * Z)) */
18
long double complex cacosl (long double complex Z)
20
long double complex Res;
28
__real__ Res = acosl (x);
34
long double complex ZZ;
35
/* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
36
/* caculate 1 - Z * Z */
37
__real__ ZZ = 1.0L - (x - y) * (x + y);
38
__imag__ ZZ = -2.0L * x * y;
43
/* calculate ZZ + I * sqrt (ZZ) */
45
__real__ ZZ = x - __imag__ Res;
46
__imag__ ZZ = y + __real__ Res;
52
__real__ Res = __imag__ ZZ;
53
__imag__ Res = - __real__ ZZ;
60
/* cacos ( Z ) = pi/2 - casin ( Z ) */
62
#define _M_PI_2L 1.5707963267948966192313L
64
long double complex cacosl (long double complex Z)
66
long double complex Res = casinl (Z);
67
__real__ Res = _M_PI_2L - __real__ Res;
68
__imag__ Res = - __imag__ Res;