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

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex/complex')
-rw-r--r--winsup/mingw/mingwex/complex/cabs.c7
-rwxr-xr-xwinsup/mingw/mingwex/complex/cabsf.c7
-rwxr-xr-xwinsup/mingw/mingwex/complex/cabsl.c7
-rw-r--r--winsup/mingw/mingwex/complex/cacos.c82
-rwxr-xr-xwinsup/mingw/mingwex/complex/cacosf.c64
-rw-r--r--winsup/mingw/mingwex/complex/cacosh.c37
-rwxr-xr-xwinsup/mingw/mingwex/complex/cacoshf.c37
-rwxr-xr-xwinsup/mingw/mingwex/complex/cacoshl.c39
-rwxr-xr-xwinsup/mingw/mingwex/complex/cacosl.c66
-rwxr-xr-xwinsup/mingw/mingwex/complex/carg.c9
-rwxr-xr-xwinsup/mingw/mingwex/complex/cargf.c9
-rwxr-xr-xwinsup/mingw/mingwex/complex/cargl.c8
-rw-r--r--winsup/mingw/mingwex/complex/casin.c48
-rwxr-xr-xwinsup/mingw/mingwex/complex/casinf.c48
-rw-r--r--winsup/mingw/mingwex/complex/casinh.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/casinhf.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/casinhl.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/casinl.c48
-rw-r--r--winsup/mingw/mingwex/complex/catan.c49
-rwxr-xr-xwinsup/mingw/mingwex/complex/catanf.c49
-rw-r--r--winsup/mingw/mingwex/complex/catanh.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/catanhf.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/catanhl.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/catanl.c53
-rw-r--r--winsup/mingw/mingwex/complex/ccos.c20
-rwxr-xr-xwinsup/mingw/mingwex/complex/ccosf.c20
-rw-r--r--winsup/mingw/mingwex/complex/ccosh.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/ccoshf.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/ccoshl.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/ccosl.c20
-rw-r--r--winsup/mingw/mingwex/complex/cexp.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/cexpf.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/cexpl.c19
-rw-r--r--winsup/mingw/mingwex/complex/cimag.c6
-rwxr-xr-xwinsup/mingw/mingwex/complex/cimagf.c6
-rwxr-xr-xwinsup/mingw/mingwex/complex/cimagl.c5
-rw-r--r--winsup/mingw/mingwex/complex/clog.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/clogf.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/clogl.c19
-rw-r--r--winsup/mingw/mingwex/complex/cpow.c48
-rwxr-xr-xwinsup/mingw/mingwex/complex/cpowf.c43
-rwxr-xr-xwinsup/mingw/mingwex/complex/cpowl.c43
-rw-r--r--winsup/mingw/mingwex/complex/cproj.c22
-rwxr-xr-xwinsup/mingw/mingwex/complex/cprojf.c22
-rwxr-xr-xwinsup/mingw/mingwex/complex/cprojl.c22
-rw-r--r--winsup/mingw/mingwex/complex/creal.c6
-rwxr-xr-xwinsup/mingw/mingwex/complex/crealf.c6
-rwxr-xr-xwinsup/mingw/mingwex/complex/creall.c5
-rw-r--r--winsup/mingw/mingwex/complex/csin.c21
-rwxr-xr-xwinsup/mingw/mingwex/complex/csinf.c21
-rw-r--r--winsup/mingw/mingwex/complex/csinh.c21
-rwxr-xr-xwinsup/mingw/mingwex/complex/csinhf.c21
-rwxr-xr-xwinsup/mingw/mingwex/complex/csinhl.c20
-rwxr-xr-xwinsup/mingw/mingwex/complex/csinl.c21
-rw-r--r--winsup/mingw/mingwex/complex/csqrt.c56
-rwxr-xr-xwinsup/mingw/mingwex/complex/csqrtf.c49
-rwxr-xr-xwinsup/mingw/mingwex/complex/csqrtl.c55
-rw-r--r--winsup/mingw/mingwex/complex/ctan.c41
-rwxr-xr-xwinsup/mingw/mingwex/complex/ctanf.c41
-rw-r--r--winsup/mingw/mingwex/complex/ctanh.c44
-rwxr-xr-xwinsup/mingw/mingwex/complex/ctanhf.c44
-rwxr-xr-xwinsup/mingw/mingwex/complex/ctanhl.c44
-rwxr-xr-xwinsup/mingw/mingwex/complex/ctanl.c41
63 files changed, 0 insertions, 1810 deletions
diff --git a/winsup/mingw/mingwex/complex/cabs.c b/winsup/mingw/mingwex/complex/cabs.c
deleted file mode 100644
index ff547dd6e..000000000
--- a/winsup/mingw/mingwex/complex/cabs.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-#include <complex.h>
-
-double cabs (double complex Z)
-{
- return _hypot ( __real__ Z, __imag__ Z);
-}
diff --git a/winsup/mingw/mingwex/complex/cabsf.c b/winsup/mingw/mingwex/complex/cabsf.c
deleted file mode 100755
index 452e88f1c..000000000
--- a/winsup/mingw/mingwex/complex/cabsf.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-#include <complex.h>
-
-float cabsf (float complex Z)
-{
- return (float) _hypot ( __real__ Z, __imag__ Z);
-}
diff --git a/winsup/mingw/mingwex/complex/cabsl.c b/winsup/mingw/mingwex/complex/cabsl.c
deleted file mode 100755
index 33124653b..000000000
--- a/winsup/mingw/mingwex/complex/cabsl.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-#include <complex.h>
-
-long double cabsl (long double complex Z)
-{
- return hypotl ( __real__ Z, __imag__ Z);
-}
diff --git a/winsup/mingw/mingwex/complex/cacos.c b/winsup/mingw/mingwex/complex/cacos.c
deleted file mode 100644
index 265cba0d7..000000000
--- a/winsup/mingw/mingwex/complex/cacos.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- cacos.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacos (Z) = -I * clog(Z + I * csqrt(1 - Z * Z)) */
-
-double complex cacos (double complex Z)
-{
- double complex Res;
- double x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0)
- {
- __real__ Res = acos (x);
- __imag__ Res = 0.0;
- }
-
- else
- {
- double complex ZZ;
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* caculate 1 - Z * Z */
- __real__ ZZ = 1.0 - (x - y) * (x + y);
- __imag__ ZZ = -2.0 * x * y;
-
-
- Res = csqrt(ZZ);
-
- /* calculate ZZ + I * sqrt (ZZ) */
-
- __real__ ZZ = x - __imag__ Res;
- __imag__ ZZ = y + __real__ Res;
-
- ZZ = clog(ZZ);
-
- /* mult by -I */
-
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return Res;
-}
-
-#else
-
-/* cacos ( Z ) = pi/2 - casin ( Z ) */
-
-double complex cacos (double complex Z)
-{
- double complex Res = casin (Z);
- __real__ Res = M_PI_2 - __real__ Res;
- __imag__ Res = - __imag__ Res;
- return Res;
-}
-#endif
-
-#if 0
-#include <stdio.h>
-int main()
-{
- double z;
- double complex bar = 0.7 + 1.2 * I;
- double complex foo = cacos (bar);
-
- printf ("%.16e\t%.16e\n", __real__ foo, __imag__ foo);
-
- foo = cacos (bar);
- printf ("%.16e\t%.16e\n", __real__ foo, __imag__ foo);
-
- return 1;
-}
-#endif
-
diff --git a/winsup/mingw/mingwex/complex/cacosf.c b/winsup/mingw/mingwex/complex/cacosf.c
deleted file mode 100755
index f2fbbd9b3..000000000
--- a/winsup/mingw/mingwex/complex/cacosf.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- cacosf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacos (Z) = -I * clog(Z + I * csqrt(1 - Z * Z)) */
-
-float complex cacos (float complex Z)
-{
- float complex Res;
- float x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0f)
- {
- __real__ Res = acosf (x);
- __imag__ Res = 0.0f;
- }
-
- else
- {
- float complex ZZ;
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* caculate 1 - Z * Z */
- __real__ ZZ = 1.0f - (x - y) * (x + y);
- __imag__ ZZ = -2.0f * x * y;
-
-
- Res = csqrtf(ZZ);
-
- /* calculate ZZ + I * sqrt (ZZ) */
-
- __real__ ZZ = x - __imag__ Res;
- __imag__ ZZ = y + __real__ Res;
-
- ZZ = clog(ZZ);
-
- /* mult by -I */
-
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return Res;
-}
-
-#else
-
-/* cacos ( Z ) = pi/2 - casin ( Z ) */
-
-float complex cacosf (float complex Z)
-{
- float complex Res = casinf (Z);
- __real__ Res = M_PI_2 - __real__ Res;
- __imag__ Res = - __imag__ Res;
- return Res;
-}
-#endif
diff --git a/winsup/mingw/mingwex/complex/cacosh.c b/winsup/mingw/mingwex/complex/cacosh.c
deleted file mode 100644
index 34469cb56..000000000
--- a/winsup/mingw/mingwex/complex/cacosh.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- cacosh.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacosh (z) = I * cacos (z) */
-double complex cacosh (double complex Z)
-{
- double complex Tmp;
- double complex Res;
-
- Tmp = cacos (Z);
- __real__ Res = -__imag__ Tmp;
- __imag__ Res = __real__ Tmp;
- return Res;
-}
-
-#else
-
-/* cacosh (z) = I * cacos (z) = I * (pi/2 - casin (z)) */
-
-double complex cacosh (double complex Z)
-{
- double complex Tmp;
- double complex Res;
-
- Tmp = casin (Z);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = M_PI_2 - __real__ Tmp;
- return Res;
-}
-#endif
diff --git a/winsup/mingw/mingwex/complex/cacoshf.c b/winsup/mingw/mingwex/complex/cacoshf.c
deleted file mode 100755
index 411afb3c5..000000000
--- a/winsup/mingw/mingwex/complex/cacoshf.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- cacoshf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacoshf (z) = I * cacos (z) */
-float complex cacosh (float complex Z)
-{
- float complex Tmp;
- float complex Res;
-
- Tmp = cacosf (Z);
- __real__ Res = -__imag__ Tmp;
- __imag__ Res = __real__ Tmp;
- return Res;
-}
-
-#else
-
-/* cacosh (z) = I * cacos (z) = I * (pi/2 - casin (z)) */
-
-float complex cacoshf (float complex Z)
-{
- float complex Tmp;
- float complex Res;
-
- Tmp = casinf (Z);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = M_PI_2 - __real__ Tmp;
- return Res;
-}
-#endif
diff --git a/winsup/mingw/mingwex/complex/cacoshl.c b/winsup/mingw/mingwex/complex/cacoshl.c
deleted file mode 100755
index 7f482c409..000000000
--- a/winsup/mingw/mingwex/complex/cacoshl.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- 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
diff --git a/winsup/mingw/mingwex/complex/cacosl.c b/winsup/mingw/mingwex/complex/cacosl.c
deleted file mode 100755
index c8e0b6eda..000000000
--- a/winsup/mingw/mingwex/complex/cacosl.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- cacosl.c
- Contributed by Danny Smith
- 2004-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacos (Z) = -I * clog(Z + I * csqrt(1 - Z * Z)) */
-
-long double complex cacosl (long double complex Z)
-{
- long double complex Res;
- long double x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0L)
- {
- __real__ Res = acosl (x);
- __imag__ Res = 0.0L;
- }
-
- else
- {
- long double complex ZZ;
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* caculate 1 - Z * Z */
- __real__ ZZ = 1.0L - (x - y) * (x + y);
- __imag__ ZZ = -2.0L * x * y;
-
-
- Res = csqrtl(ZZ);
-
- /* calculate ZZ + I * sqrt (ZZ) */
-
- __real__ ZZ = x - __imag__ Res;
- __imag__ ZZ = y + __real__ Res;
-
- ZZ = clogl(ZZ);
-
- /* mult by -I */
-
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return Res;
-}
-
-#else
-
-/* cacos ( Z ) = pi/2 - casin ( Z ) */
-#ifndef _M_PI_2L
-#define _M_PI_2L 1.5707963267948966192313L
-#endif
-long double complex cacosl (long double complex Z)
-{
- long double complex Res = casinl (Z);
- __real__ Res = _M_PI_2L - __real__ Res;
- __imag__ Res = - __imag__ Res;
- return Res;
-}
-#endif
diff --git a/winsup/mingw/mingwex/complex/carg.c b/winsup/mingw/mingwex/complex/carg.c
deleted file mode 100755
index cb47accb6..000000000
--- a/winsup/mingw/mingwex/complex/carg.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <complex.h>
-double __attribute__ ((const)) carg (double _Complex _Z)
-{
- double res;
- __asm__ ("fpatan;"
- : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
- return res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cargf.c b/winsup/mingw/mingwex/complex/cargf.c
deleted file mode 100755
index 360beefe4..000000000
--- a/winsup/mingw/mingwex/complex/cargf.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <complex.h>
-float __attribute__ ((const)) cargf (float _Complex _Z)
-{
- float res;
- __asm__ ("fpatan;"
- : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
- return res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cargl.c b/winsup/mingw/mingwex/complex/cargl.c
deleted file mode 100755
index 179dae704..000000000
--- a/winsup/mingw/mingwex/complex/cargl.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <complex.h>
-long double __attribute__ ((const)) cargl (long double _Complex _Z)
-{
- long double res;
- __asm__ ("fpatan;"
- : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
- return res;
-}
diff --git a/winsup/mingw/mingwex/complex/casin.c b/winsup/mingw/mingwex/complex/casin.c
deleted file mode 100644
index cd79767b5..000000000
--- a/winsup/mingw/mingwex/complex/casin.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- casin.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casin (Z ) = -I * clog(I * Z + csqrt (1.0 - Z * Z))) */
-
-double complex casin (double complex Z)
-{
- double complex Res;
- double x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0)
- {
- __real__ Res = asin (x);
- __imag__ Res = 0.0;
- }
- else /* -I * clog(I * Z + csqrt(1.0 - Z * Z))) */
- {
- double complex ZZ;
-
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* calculate 1 - Z * Z */
- __real__ ZZ = 1.0 - (x - y) * (x + y);
- __imag__ ZZ = -2.0 * x * y;
- ZZ = csqrt (ZZ);
-
-
- /* add I * Z to ZZ */
-
- __real__ ZZ -= y;
- __imag__ ZZ += x;
-
- ZZ = clog (ZZ);
-
- /* mult by -I */
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return (Res);
-}
diff --git a/winsup/mingw/mingwex/complex/casinf.c b/winsup/mingw/mingwex/complex/casinf.c
deleted file mode 100755
index a70058b0c..000000000
--- a/winsup/mingw/mingwex/complex/casinf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- casinf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casin (Z ) = -I * clog(I * Z + csqrt (1.0 - Z * Z))) */
-
-float complex casinf (float complex Z)
-{
- float complex Res;
- float x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0f)
- {
- __real__ Res = asinf (x);
- __imag__ Res = 0.0f;
- }
- else /* -I * clog(I * Z + csqrt(1.0 - Z * Z))) */
- {
- float complex ZZ;
-
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* calculate 1 - Z * Z */
- __real__ ZZ = 1.0f - (x - y) * (x + y);
- __imag__ ZZ = -2.0f * x * y;
- ZZ = csqrtf (ZZ);
-
-
- /* add I * Z to ZZ */
-
- __real__ ZZ -= y;
- __imag__ ZZ += x;
-
- ZZ = clogf (ZZ);
-
- /* mult by -I */
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return (Res);
-}
diff --git a/winsup/mingw/mingwex/complex/casinh.c b/winsup/mingw/mingwex/complex/casinh.c
deleted file mode 100644
index a86c1d625..000000000
--- a/winsup/mingw/mingwex/complex/casinh.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- casinh.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casinh (z) = -I casin (I * z) */
-
-double complex casinh (double complex Z)
-{
- double complex Tmp;
- double complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = casin (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/casinhf.c b/winsup/mingw/mingwex/complex/casinhf.c
deleted file mode 100755
index 421cd3a96..000000000
--- a/winsup/mingw/mingwex/complex/casinhf.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- casinhf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casinh (z) = -I casin (I * z) */
-
-float complex casinhf (float complex Z)
-{
- float complex Tmp;
- float complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = casinf (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/casinhl.c b/winsup/mingw/mingwex/complex/casinhl.c
deleted file mode 100755
index 348bf8084..000000000
--- a/winsup/mingw/mingwex/complex/casinhl.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- casinhl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casinh (z) = -I casin (I * z) */
-
-long double complex casinhl (long double complex Z)
-{
- long double complex Tmp;
- long double complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = casinl (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/casinl.c b/winsup/mingw/mingwex/complex/casinl.c
deleted file mode 100755
index 3093fa542..000000000
--- a/winsup/mingw/mingwex/complex/casinl.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- casinl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casin (Z ) = -I * clog(I * Z + csqrt (1.0 - Z * Z))) */
-
-long double complex casinl (long double complex Z)
-{
- long double complex Res;
- long double x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0L)
- {
- __real__ Res = asinl (x);
- __imag__ Res = 0.0L;
- }
- else /* -I * clog(I * Z + csqrt(1.0 - Z * Z))) */
- {
- long double complex ZZ;
-
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* calculate 1 - Z * Z */
- __real__ ZZ = 1.0L - (x - y) * (x + y);
- __imag__ ZZ = -2.0L * x * y;
- ZZ = csqrtl (ZZ);
-
-
- /* add I * Z to ZZ */
-
- __real__ ZZ -= y;
- __imag__ ZZ += x;
-
- ZZ = clogl (ZZ);
-
- /* mult by -I */
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return (Res);
-}
diff --git a/winsup/mingw/mingwex/complex/catan.c b/winsup/mingw/mingwex/complex/catan.c
deleted file mode 100644
index eee1e8fa7..000000000
--- a/winsup/mingw/mingwex/complex/catan.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* catan.c */
-
-/*
- Contributed by Danny Smith
- 2003-10-17
-
- FIXME: This needs some serious numerical analysis.
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/* catan (z) = -I/2 * clog ((I + z) / (I - z)) */
-
-double complex
-catan (double complex Z)
-{
- double complex Res;
- double complex Tmp;
- double x = __real__ Z;
- double y = __imag__ Z;
-
- if ( x == 0.0 && (1.0 - fabs (y)) == 0.0)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VAL;
- __imag__ Res = HUGE_VAL;
- }
- else if (isinf (_hypot (x, y)))
- {
- __real__ Res = (x > 0 ? M_PI_2 : -M_PI_2);
- __imag__ Res = 0.0;
- }
- else
- {
- __real__ Tmp = - x;
- __imag__ Tmp = 1.0 - y;
-
- __real__ Res = x;
- __imag__ Res = y + 1.0;
-
- Tmp = clog (Res/Tmp);
- __real__ Res = - 0.5 * __imag__ Tmp;
- __imag__ Res = 0.5 * __real__ Tmp;
- }
-
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/catanf.c b/winsup/mingw/mingwex/complex/catanf.c
deleted file mode 100755
index adddde885..000000000
--- a/winsup/mingw/mingwex/complex/catanf.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* catanf.c */
-
-/*
- Contributed by Danny Smith
- 2004-12-24
-
- FIXME: This needs some serious numerical analysis.
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/* catan (z) = -I/2 * clog ((I + z) / (I - z)) */
-
-float complex
-catanf (float complex Z)
-{
- float complex Res;
- float complex Tmp;
- float x = __real__ Z;
- float y = __imag__ Z;
-
- if ( x == 0.0f && (1.0f - fabsf (y)) == 0.0f)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALF;
- __imag__ Res = HUGE_VALF;
- }
- else if (isinf (hypotf (x, y)))
- {
- __real__ Res = (x > 0 ? M_PI_2 : -M_PI_2);
- __imag__ Res = 0.0f;
- }
- else
- {
- __real__ Tmp = - x;
- __imag__ Tmp = 1.0f - y;
-
- __real__ Res = x;
- __imag__ Res = y + 1.0f;
-
- Tmp = clogf (Res/Tmp);
- __real__ Res = - 0.5f * __imag__ Tmp;
- __imag__ Res = 0.5f * __real__ Tmp;
- }
-
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/catanh.c b/winsup/mingw/mingwex/complex/catanh.c
deleted file mode 100644
index 78f028014..000000000
--- a/winsup/mingw/mingwex/complex/catanh.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* catanh.c */
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* catanh (z) = -I * catan (I * z) */
-
-double complex catanh (double complex Z)
-{
- double complex Tmp;
- double complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = catan (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/catanhf.c b/winsup/mingw/mingwex/complex/catanhf.c
deleted file mode 100755
index 7a792e88b..000000000
--- a/winsup/mingw/mingwex/complex/catanhf.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* catanhf.c */
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* catanh (z) = -I * catan (I * z) */
-
-float complex catanhf (float complex Z)
-{
- float complex Tmp;
- float complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = catanf (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/catanhl.c b/winsup/mingw/mingwex/complex/catanhl.c
deleted file mode 100755
index 50a3be950..000000000
--- a/winsup/mingw/mingwex/complex/catanhl.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* catanhl.c */
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* catanh (z) = -I * catan (I * z) */
-
-long double complex catanhl (long double complex Z)
-{
- long double complex Tmp;
- long double complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = catanl (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/catanl.c b/winsup/mingw/mingwex/complex/catanl.c
deleted file mode 100755
index 1fd62685a..000000000
--- a/winsup/mingw/mingwex/complex/catanl.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* catanl.c */
-
-/*
- Contributed by Danny Smith
- 2005-01-04
-
- FIXME: This needs some serious numerical analysis.
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/* catan (z) = -I/2 * clog ((I + z) / (I - z)) */
-
-#ifndef _M_PI_2L
-#define _M_PI_2L 1.5707963267948966192313L
-#endif
-
-long double complex
-catanl (long double complex Z)
-{
- long double complex Res;
- long double complex Tmp;
- long double x = __real__ Z;
- long double y = __imag__ Z;
-
- if ( x == 0.0L && (1.0L - fabsl (y)) == 0.0L)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALL;
- __imag__ Res = HUGE_VALL;
- }
- else if (isinf (hypotl (x, y)))
- {
- __real__ Res = (x > 0 ? _M_PI_2L : -_M_PI_2L);
- __imag__ Res = 0.0L;
- }
- else
- {
- __real__ Tmp = - x;
- __imag__ Tmp = 1.0L - y;
-
- __real__ Res = x;
- __imag__ Res = y + 1.0L;
-
- Tmp = clogl (Res/Tmp);
- __real__ Res = - 0.5L * __imag__ Tmp;
- __imag__ Res = 0.5L * __real__ Tmp;
- }
-
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccos.c b/winsup/mingw/mingwex/complex/ccos.c
deleted file mode 100644
index ef5b5a70e..000000000
--- a/winsup/mingw/mingwex/complex/ccos.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- ccos.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccos (x + I * y) = cos (x) * cosh (y)
- + I * (sin (x) * sinh (y)) */
-
-
-double complex ccos (double complex Z)
-{
- double complex Res;
- __real__ Res = cos (__real__ Z) * cosh ( __imag__ Z);
- __imag__ Res = -sin (__real__ Z) * sinh ( __imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccosf.c b/winsup/mingw/mingwex/complex/ccosf.c
deleted file mode 100755
index 64a676455..000000000
--- a/winsup/mingw/mingwex/complex/ccosf.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- ccosf.c
- Contributed by Danny Smith
- 2003-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccos (x + I * y) = cos (x) * cosh (y)
- + I * (sin (x) * sinh (y)) */
-
-
-float complex ccosf (float complex Z)
-{
- float complex Res;
- __real__ Res = cosf (__real__ Z) * coshf ( __imag__ Z);
- __imag__ Res = -sinf (__real__ Z) * sinhf ( __imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccosh.c b/winsup/mingw/mingwex/complex/ccosh.c
deleted file mode 100644
index 8d304fd0e..000000000
--- a/winsup/mingw/mingwex/complex/ccosh.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- 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;
-}
diff --git a/winsup/mingw/mingwex/complex/ccoshf.c b/winsup/mingw/mingwex/complex/ccoshf.c
deleted file mode 100755
index ce78cd62d..000000000
--- a/winsup/mingw/mingwex/complex/ccoshf.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- ccoshf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccosh (x + I * y) = cosh (x) * cos (y)
- + I * (sinh (x) * sin (y)) */
-
-float complex ccoshf (float complex Z)
-{
- float complex Res;
- __real__ Res = coshf (__real__ Z) * cosf (__imag__ Z);
- __imag__ Res = sinhf (__real__ Z) * sinf (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccoshl.c b/winsup/mingw/mingwex/complex/ccoshl.c
deleted file mode 100755
index 0fb2526c7..000000000
--- a/winsup/mingw/mingwex/complex/ccoshl.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- ccoshl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccosh (x + I * y) = cosh (x) * cos (y)
- + I * (sinh (x) * sin (y)) */
-
-long double complex ccoshl (long double complex Z)
-{
- long double complex Res;
- __real__ Res = coshl (__real__ Z) * cosl (__imag__ Z);
- __imag__ Res = sinhl (__real__ Z) * sinl (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccosl.c b/winsup/mingw/mingwex/complex/ccosl.c
deleted file mode 100755
index 981fdf0ea..000000000
--- a/winsup/mingw/mingwex/complex/ccosl.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- ccosl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccos (x + I * y) = cos (x) * cosh (y)
- + I * (sin (x) * sinh (y)) */
-
-
-long double complex ccosl (long double complex Z)
-{
- long double complex Res;
- __real__ Res = cosl (__real__ Z) * coshl ( __imag__ Z);
- __imag__ Res = -sinl (__real__ Z) * sinhl ( __imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cexp.c b/winsup/mingw/mingwex/complex/cexp.c
deleted file mode 100644
index 43ac9ab9e..000000000
--- a/winsup/mingw/mingwex/complex/cexp.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- cexp.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* cexp (x + I * y) = exp (x) * cos (y) + I * exp (x) * sin (y) */
-
-double complex cexp (double complex Z)
-{
- double complex Res;
- long double rho = exp (__real__ Z);
- __real__ Res = rho * cos(__imag__ Z);
- __imag__ Res = rho * sin(__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cexpf.c b/winsup/mingw/mingwex/complex/cexpf.c
deleted file mode 100755
index fabb1a0cb..000000000
--- a/winsup/mingw/mingwex/complex/cexpf.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- cexpf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* cexp (x + I * y) = exp (x) * cos (y) + I * exp (x) * sin (y) */
-
-float complex cexpf (float complex Z)
-{
- float complex Res;
- double rho = exp (__real__ Z);
- __real__ Res = rho * cosf(__imag__ Z);
- __imag__ Res = rho * sinf(__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cexpl.c b/winsup/mingw/mingwex/complex/cexpl.c
deleted file mode 100755
index 9f2ed2676..000000000
--- a/winsup/mingw/mingwex/complex/cexpl.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- cexpl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* cexp (x + I * y) = exp (x) * cos (y) + I * exp (x) * sin (y) */
-
-long double complex cexpl (long double complex Z)
-{
- long double complex Res;
- long double rho = expl (__real__ Z);
- __real__ Res = rho * cosl(__imag__ Z);
- __imag__ Res = rho * sinl(__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cimag.c b/winsup/mingw/mingwex/complex/cimag.c
deleted file mode 100644
index b6b32561c..000000000
--- a/winsup/mingw/mingwex/complex/cimag.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-double __attribute__ ((const)) cimag (double complex _Z)
-{
- return __imag__ _Z;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cimagf.c b/winsup/mingw/mingwex/complex/cimagf.c
deleted file mode 100755
index f77b9ec54..000000000
--- a/winsup/mingw/mingwex/complex/cimagf.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-float __attribute__ ((const)) cimagf (float complex _Z)
-{
- return __imag__ _Z;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cimagl.c b/winsup/mingw/mingwex/complex/cimagl.c
deleted file mode 100755
index 9b023b49b..000000000
--- a/winsup/mingw/mingwex/complex/cimagl.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <complex.h>
-long double __attribute__ ((const)) cimagl (long double complex _Z)
-{
- return __imag__ _Z;
-}
diff --git a/winsup/mingw/mingwex/complex/clog.c b/winsup/mingw/mingwex/complex/clog.c
deleted file mode 100644
index 57c51ebb0..000000000
--- a/winsup/mingw/mingwex/complex/clog.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- clog.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-/* clog (x + I * y) = log (hypot (x, y)) + I * atan2 (y, x) */
-
-#include <math.h>
-#include <complex.h>
-
-double complex clog (double complex Z)
-{
- double complex Res;
- __real__ Res = log (_hypot (__real__ Z, __imag__ Z));
- __imag__ Res = carg (Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/clogf.c b/winsup/mingw/mingwex/complex/clogf.c
deleted file mode 100755
index ead76025f..000000000
--- a/winsup/mingw/mingwex/complex/clogf.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- clogf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-/* clog (x + I * y) = log (hypot (x, y)) + I * atan2 (y, x) */
-
-#include <math.h>
-#include <complex.h>
-
-float complex clogf (float complex Z)
-{
- float complex Res;
- __real__ Res = logf (_hypot (__real__ Z, __imag__ Z));
- __imag__ Res = cargf (Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/clogl.c b/winsup/mingw/mingwex/complex/clogl.c
deleted file mode 100755
index 0114c91f6..000000000
--- a/winsup/mingw/mingwex/complex/clogl.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- clogl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-/* clog (x + I * y) = log (hypot (x, y)) + I * atan2 (y, x) */
-
-#include <math.h>
-#include <complex.h>
-
-long double complex clogl (long double complex Z)
-{
- long double complex Res;
- __real__ Res = logl (hypotl (__real__ Z, __imag__ Z));
- __imag__ Res = cargl (Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cpow.c b/winsup/mingw/mingwex/complex/cpow.c
deleted file mode 100644
index c12b12fc0..000000000
--- a/winsup/mingw/mingwex/complex/cpow.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* cpow.c */
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-/* cpow(X, Y) = cexp(X * clog(Y)) */
-
-#include <math.h>
-#include <complex.h>
-
-/* Use dll version of pow */
-extern double (*_imp__pow) (double, double);
-#define pow (*_imp__pow)
-
-double complex cpow (double complex X, double complex Y)
-{
- double complex Res;
- double i;
- double r = hypot (__real__ X, __imag__ X);
- if (r == 0.0)
- {
- __real__ Res = __imag__ Res = 0.0;
- }
- else
- {
- double rho;
- double theta;
- i = carg (X);
- theta = i * __real__ Y;
-
- if (__imag__ Y == 0.0)
- /* This gives slightly more accurate results in these cases. */
- rho = pow (r, __real__ Y);
- else
- {
- r = log (r);
- /* rearrangement of cexp(X * clog(Y)) */
- theta += r * __imag__ Y;
- rho = exp (r * __real__ Y - i * __imag__ Y);
- }
-
- __real__ Res = rho * cos (theta);
- __imag__ Res = rho * sin (theta);
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cpowf.c b/winsup/mingw/mingwex/complex/cpowf.c
deleted file mode 100755
index eeeed1b7f..000000000
--- a/winsup/mingw/mingwex/complex/cpowf.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* cpowf.c */
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-/* cpow(X, Y) = cexp(X * clog(Y)) */
-
-#include <math.h>
-#include <complex.h>
-
-float complex cpowf (float complex X, float complex Y)
-{
- float complex Res;
- float i;
- float r = _hypot (__real__ X, __imag__ X);
- if (r == 0.0f)
- {
- __real__ Res = __imag__ Res = 0.0;
- }
- else
- {
- float rho;
- float theta;
- i = cargf (X);
- theta = i * __real__ Y;
-
- if (__imag__ Y == 0.0f)
- /* This gives slightly more accurate results in these cases. */
- rho = powf (r, __real__ Y);
- else
- {
- r = logf (r);
- /* rearrangement of cexp(X * clog(Y)) */
- theta += r * __imag__ Y;
- rho = expf (r * __real__ Y - i * __imag__ Y);
- }
-
- __real__ Res = rho * cosf (theta);
- __imag__ Res = rho * sinf (theta);
- }
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cpowl.c b/winsup/mingw/mingwex/complex/cpowl.c
deleted file mode 100755
index c614a6d59..000000000
--- a/winsup/mingw/mingwex/complex/cpowl.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* cpowl.c */
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-/* cpow(X, Y) = cexp(X * clog(Y)) */
-
-#include <math.h>
-#include <complex.h>
-
-long double complex cpowl (long double complex X, long double complex Y)
-{
- long double complex Res;
- long double i;
- long double r = hypotl (__real__ X, __imag__ X);
- if (r == 0.0L)
- {
- __real__ Res = __imag__ Res = 0.0L;
- }
- else
- {
- long double rho;
- long double theta;
- i = cargl (X);
- theta = i * __real__ Y;
-
- if (__imag__ Y == 0.0L)
- /* This gives slightly more accurate results in these cases. */
- rho = powl (r, __real__ Y);
- else
- {
- r = logl (r);
- /* rearrangement of cexp(X * clog(Y)) */
- theta += r * __imag__ Y;
- rho = expl (r * __real__ Y - i * __imag__ Y);
- }
-
- __real__ Res = rho * cosl (theta);
- __imag__ Res = rho * sinl (theta);
- }
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cproj.c b/winsup/mingw/mingwex/complex/cproj.c
deleted file mode 100644
index cc7c48d0f..000000000
--- a/winsup/mingw/mingwex/complex/cproj.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- cproj.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* Return the value of the projection onto the Riemann sphere.*/
-
-double complex cproj (double complex Z)
-{
- complex double Res = Z;
- if (isinf (__real__ Z) || isinf (__imag__ Z))
- {
- __real__ Res = HUGE_VAL;
- __imag__ Res = copysign (0.0, __imag__ Z);
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cprojf.c b/winsup/mingw/mingwex/complex/cprojf.c
deleted file mode 100755
index f1d2d730a..000000000
--- a/winsup/mingw/mingwex/complex/cprojf.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- cprojf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* Return the value of the projection onto the Riemann sphere.*/
-
-float complex cprojf (float complex Z)
-{
- complex float Res = Z;
- if (isinf (__real__ Z) || isinf (__imag__ Z))
- {
- __real__ Res = HUGE_VALF;
- __imag__ Res = copysignf (0.0f, __imag__ Z);
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cprojl.c b/winsup/mingw/mingwex/complex/cprojl.c
deleted file mode 100755
index 224d26fd6..000000000
--- a/winsup/mingw/mingwex/complex/cprojl.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- cprojl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* Return the value of the projection onto the Riemann sphere.*/
-
-long double complex cprojl (long double complex Z)
-{
- complex long double Res = Z;
- if (isinf (__real__ Z) || isinf (__imag__ Z))
- {
- __real__ Res = HUGE_VALL;
- __imag__ Res = copysignl (0.0L, __imag__ Z);
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/creal.c b/winsup/mingw/mingwex/complex/creal.c
deleted file mode 100644
index 6905b7e2a..000000000
--- a/winsup/mingw/mingwex/complex/creal.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-double __attribute__ ((const)) creal (double complex _Z)
-{
- return __real__ _Z;
-}
-
diff --git a/winsup/mingw/mingwex/complex/crealf.c b/winsup/mingw/mingwex/complex/crealf.c
deleted file mode 100755
index 16dc7ec46..000000000
--- a/winsup/mingw/mingwex/complex/crealf.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-float __attribute__ ((const)) crealf (float complex _Z)
-{
- return __real__ _Z;
-}
-
diff --git a/winsup/mingw/mingwex/complex/creall.c b/winsup/mingw/mingwex/complex/creall.c
deleted file mode 100755
index 62470d961..000000000
--- a/winsup/mingw/mingwex/complex/creall.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <complex.h>
-long double __attribute__ ((const)) creall (long double complex _Z)
-{
- return __real__ _Z;
-}
diff --git a/winsup/mingw/mingwex/complex/csin.c b/winsup/mingw/mingwex/complex/csin.c
deleted file mode 100644
index 37df8057e..000000000
--- a/winsup/mingw/mingwex/complex/csin.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* csin.c */
-
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* csin (x + I * y) = sin (x) * cosh (y)
- + I * (cos (x) * sinh (y)) */
-
-double complex csin (double complex Z)
-{
- double complex Res;
- __real__ Res = sin (__real__ Z) * cosh ( __imag__ Z);
- __imag__ Res = cos (__real__ Z) * sinh ( __imag__ Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/csinf.c b/winsup/mingw/mingwex/complex/csinf.c
deleted file mode 100755
index def23f27e..000000000
--- a/winsup/mingw/mingwex/complex/csinf.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* csinf.c */
-
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* csin (x + I * y) = sin (x) * cosh (y)
- + I * (cos (x) * sinh (y)) */
-
-float complex csinf (float complex Z)
-{
- float complex Res;
- __real__ Res = sinf (__real__ Z) * coshf ( __imag__ Z);
- __imag__ Res = cosf (__real__ Z) * sinhf ( __imag__ Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/csinh.c b/winsup/mingw/mingwex/complex/csinh.c
deleted file mode 100644
index 4ee6cbe86..000000000
--- a/winsup/mingw/mingwex/complex/csinh.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* csinh.c */
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-
-#include <math.h>
-#include <complex.h>
-
-/* csinh (x + I * y) = sinh (x) * cos (y)
- + I * (cosh (x) * sin (y)) */
-
-
-double complex csinh (double complex Z)
-{
- double complex Res;
- __real__ Res = sinh (__real__ Z) * cos (__imag__ Z);
- __imag__ Res = cosh (__real__ Z) * sin (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/csinhf.c b/winsup/mingw/mingwex/complex/csinhf.c
deleted file mode 100755
index b0d008ed7..000000000
--- a/winsup/mingw/mingwex/complex/csinhf.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* csinhf.c */
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-
-#include <math.h>
-#include <complex.h>
-
-/* csinh (x + I * y) = sinh (x) * cos (y)
- + I * (cosh (x) * sin (y)) */
-
-
-float complex csinhf (float complex Z)
-{
- float complex Res;
- __real__ Res = sinhf (__real__ Z) * cosf (__imag__ Z);
- __imag__ Res = coshf (__real__ Z) * sinf (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/csinhl.c b/winsup/mingw/mingwex/complex/csinhl.c
deleted file mode 100755
index 187ccf0f6..000000000
--- a/winsup/mingw/mingwex/complex/csinhl.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* csinhl.c */
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* csinh (x + I * y) = sinh (x) * cos (y)
- + I * (cosh (x) * sin (y)) */
-
-
-long double complex csinhl (long double complex Z)
-{
- long double complex Res;
- __real__ Res = sinhl (__real__ Z) * cosl (__imag__ Z);
- __imag__ Res = coshl (__real__ Z) * sinl (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/csinl.c b/winsup/mingw/mingwex/complex/csinl.c
deleted file mode 100755
index 2a98c7c0f..000000000
--- a/winsup/mingw/mingwex/complex/csinl.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* csinl.c */
-
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* csin (x + I * y) = sin (x) * cosh (y)
- + I * (cos (x) * sinh (y)) */
-
-long double complex csinl (long double complex Z)
-{
- long double complex Res;
- __real__ Res = sinl (__real__ Z) * coshl ( __imag__ Z);
- __imag__ Res = cosl (__real__ Z) * sinhl ( __imag__ Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/csqrt.c b/winsup/mingw/mingwex/complex/csqrt.c
deleted file mode 100644
index b5f8868e9..000000000
--- a/winsup/mingw/mingwex/complex/csqrt.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- csqrt.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-double complex csqrt (double complex Z)
-{
- double complex Res;
- double t;
- double x = __real__ Z;
- double y = __imag__ Z;
-
- if (y == 0.0)
- {
- if (x < 0.0)
- {
- __real__ Res = 0.0;
- __imag__ Res = sqrt (-x);
- }
- else
- {
- __real__ Res = sqrt (x);
- __imag__ Res = 0.0;
- }
- }
-
- else if (x == 0.0)
- {
- t = sqrt(0.5 * fabs (y));
- __real__ Res = t;
- __imag__ Res = y > 0 ? t : -t;
- }
-
- else
- {
- t = sqrt (2.0 * (_hypot (x, y) + fabs (x)));
- double u = t / 2.0;
- if ( x > 0.0)
- {
- __real__ Res = u;
- __imag__ Res = y / t;
- }
- else
- {
- __real__ Res = fabs ( y / t);
- __imag__ Res = y < 0.0 ? -u : u;
- }
- }
-
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/csqrtf.c b/winsup/mingw/mingwex/complex/csqrtf.c
deleted file mode 100755
index 7c37e99ce..000000000
--- a/winsup/mingw/mingwex/complex/csqrtf.c
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <math.h>
-#include <complex.h>
-
-float complex csqrtf (float complex Z)
-{
- float complex Res;
- float r;
- float x = __real__ Z;
- float y = __imag__ Z;
-
- if (y == 0.0f)
- {
- if (x < 0.0f)
- {
- __real__ Res = 0.0f;
- __imag__ Res = sqrtf (-x);
- }
- else
- {
- __real__ Res = sqrtf (x);
- __imag__ Res = 0.0f;
- }
- }
-
- else if (x == 0.0f)
- {
- r = sqrtf(0.5f * fabsf (y));
- __real__ Res = r;
- __imag__ Res = y > 0 ? r : -r;
- }
-
- else
- {
- float t = sqrtf (2 * (_hypot (__real__ Z, __imag__ Z) + fabsf (x)));
- float u = t / 2.0f;
- if ( x > 0.0f)
- {
- __real__ Res = u;
- __imag__ Res = y / t;
- }
- else
- {
- __real__ Res = fabsf (y / t);
- __imag__ Res = y < 0 ? -u : u;
- }
- }
-
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/csqrtl.c b/winsup/mingw/mingwex/complex/csqrtl.c
deleted file mode 100755
index 1b2ebbe5b..000000000
--- a/winsup/mingw/mingwex/complex/csqrtl.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* csqrtl.c */
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-long double complex csqrtl (long double complex Z)
-{
- long double complex Res;
- long double r;
- long double x = __real__ Z;
- long double y = __imag__ Z;
-
- if (y == 0.0L)
- {
- if (x < 0.0L)
- {
- __real__ Res = 0.0L;
- __imag__ Res = sqrtl (-x);
- }
- else
- {
- __real__ Res = sqrtl (x);
- __imag__ Res = 0.0L;
- }
- }
-
- else if (x == 0.0L)
- {
- r = sqrtl(0.5L * fabsl (y));
- __real__ Res = r;
- __imag__ Res = y > 0 ? r : -r;
- }
-
- else
- {
- long double t = sqrtl (2.0L * (hypotl (__real__ Z, __imag__ Z) + fabsl (x)));
- long double u = t / 2.0L;
- if ( x > 0.0L)
- {
- __real__ Res = u;
- __imag__ Res = y / t;
- }
- else
- {
- __real__ Res = fabsl (y / t);
- __imag__ Res = y < 0 ? -u : u;
- }
- }
-
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ctan.c b/winsup/mingw/mingwex/complex/ctan.c
deleted file mode 100644
index a479772a9..000000000
--- a/winsup/mingw/mingwex/complex/ctan.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* ctan.c */
-
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-
-/* ctan (x + I * y) = (sin (2 * x) + I * sinh(2 * y))
- / (cos (2 * x) + cosh (2 * y)) */
-
-double complex ctan (double complex Z)
-{
- double complex Res;
- double two_I = 2.0 * __imag__ Z;
- double two_R = 2.0 * __real__ Z;
- double denom = cos (two_R) + cosh (two_I);
- if (denom == 0.0)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VAL;
- __imag__ Res = HUGE_VAL;
- }
- else if (isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = 0.0;
- __imag__ Res = two_I > 0 ? 1.0 : -1.0;
- }
- else
- {
- __real__ Res = sin (two_R) / denom;
- __imag__ Res = sinh (two_I) / denom;
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/ctanf.c b/winsup/mingw/mingwex/complex/ctanf.c
deleted file mode 100755
index 99699e427..000000000
--- a/winsup/mingw/mingwex/complex/ctanf.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* ctanf.c */
-
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-
-/* ctan (x + I * y) = (sin (2 * x) + I * sinh(2 * y))
- / (cos (2 * x) + cosh (2 * y)) */
-
-float complex ctanf (float complex Z)
-{
- float complex Res;
- float two_I = 2.0f * __imag__ Z;
- float two_R = 2.0f * __real__ Z;
- float denom = cosf (two_R) + coshf (two_I);
- if (denom == 0.0f)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALF;
- __imag__ Res = HUGE_VALF;
- }
- else if (isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = 0.0;
- __imag__ Res = two_I > 0 ? 1.0f : -1.0f;
- }
- else
- {
- __real__ Res = sinf (two_R) / denom;
- __imag__ Res = sinhf (two_I) / denom;
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/ctanh.c b/winsup/mingw/mingwex/complex/ctanh.c
deleted file mode 100644
index 6d3e615da..000000000
--- a/winsup/mingw/mingwex/complex/ctanh.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ctanh.c */
-
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/*
- ctanh (x + I * y) = (sinh (2 * x) + sin (2 * y) * I )
- / (cosh (2 * x) + cos (2 * y)) .
-*/
-
-double complex
-ctanh (double complex Z)
-{
- double complex Res;
- double two_R = 2.0 * __real__ Z;
- double two_I = 2.0 * __imag__ Z;
- double denom = cosh (two_R) + cos (two_I);
-
- if (denom == 0.0)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VAL;
- __imag__ Res = HUGE_VAL;
- }
- else if ( isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = two_R > 0 ? 1.0 : -1.0;
- __imag__ Res = 0.0;
- }
- else
- {
- __real__ Res = sinh (two_R) / denom;
- __imag__ Res = sin (two_I) / denom;
- }
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ctanhf.c b/winsup/mingw/mingwex/complex/ctanhf.c
deleted file mode 100755
index 82a9c9a43..000000000
--- a/winsup/mingw/mingwex/complex/ctanhf.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ctanhf.c */
-
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/*
- ctanh (x + I * y) = (sinh (2 * x) + sin (2 * y) * I )
- / (cosh (2 * x) + cos (2 * y)) .
-*/
-
-float complex
-ctanhf (float complex Z)
-{
- float complex Res;
- float two_R = 2.0f * __real__ Z;
- float two_I = 2.0f * __imag__ Z;
- float denom = coshf (two_R) + cosf (two_I);
-
- if (denom == 0.0f)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALF;
- __imag__ Res = HUGE_VALF;
- }
- else if (isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = two_R > 0 ? 1.0f : -1.0f;
- __imag__ Res = 0.0f;
- }
- else
- {
- __real__ Res = sinhf (two_R) / denom;
- __imag__ Res = sinf (two_I) / denom;
- }
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ctanhl.c b/winsup/mingw/mingwex/complex/ctanhl.c
deleted file mode 100755
index 050b636a1..000000000
--- a/winsup/mingw/mingwex/complex/ctanhl.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ctanhl.c */
-
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/*
- ctanh (x + I * y) = (sinh (2 * x) + sin (2 * y) * I )
- / (cosh (2 * x) + cos (2 * y)) .
-*/
-
-long double complex
-ctanhl (long double complex Z)
-{
- long double complex Res;
- long double two_R = 2.0L * __real__ Z;
- long double two_I = 2.0L * __imag__ Z;
- long double denom = coshl (two_R) + cosl (two_I);
-
- if (denom == 0.0L)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALL;
- __imag__ Res = HUGE_VALL;
- }
- else if (isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = two_R > 0 ? 1.0L : -1.0L;
- __imag__ Res = 0.0L;
- }
- else
- {
- __real__ Res = sinhl (two_R) / denom;
- __imag__ Res = sinl (two_I) / denom;
- }
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ctanl.c b/winsup/mingw/mingwex/complex/ctanl.c
deleted file mode 100755
index 7d3076159..000000000
--- a/winsup/mingw/mingwex/complex/ctanl.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* ctanl.c */
-
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-
-/* ctan (x + I * y) = (sin (2 * x) + I * sinh(2 * y))
- / (cos (2 * x) + cosh (2 * y)) */
-
-long double complex ctanl (long double complex Z)
-{
- long double complex Res;
- long double two_I = 2.0L * __imag__ Z;
- long double two_R = 2.0L * __real__ Z;
- long double denom = cosl (two_R) + coshl (two_I);
- if (denom == 0.0L)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALL;
- __imag__ Res = HUGE_VALL;
- }
- else if (isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = 0.0;
- __imag__ Res = two_I > 0 ? 1.0L : -1.0L;
- }
- else
- {
- __real__ Res = sinl (two_R) / denom;
- __imag__ Res = sinhl (two_I) / denom;
- }
- return Res;
-}
-