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/csqrtf.c')
-rwxr-xr-xwinsup/mingw/mingwex/complex/csqrtf.c49
1 files changed, 0 insertions, 49 deletions
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;
-}