summaryrefslogtreecommitdiff
path: root/Modules/cmathmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-09-06 08:16:17 +0000
committerMartin v. Löwis <martin@v.loewis.de>2001-09-06 08:16:17 +0000
commit292670cfa4cfa61187a92b23c522ac615696b31b (patch)
tree9754ae2f067dba0d1f04594d6b217467660b39e4 /Modules/cmathmodule.c
parentcb35c275a7c9834cfe891f3752f72e8c4fed65ca (diff)
downloadcpython-292670cfa4cfa61187a92b23c522ac615696b31b.tar.gz
Revert parts of patch #453627, documenting the resulting test failures
instead.
Diffstat (limited to 'Modules/cmathmodule.c')
-rw-r--r--Modules/cmathmodule.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index 34b0ce85f3..adf76b8a33 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -8,22 +8,6 @@
#define M_PI (3.141592653589793239)
#endif
-#ifdef SCO_ATAN2_BUG
-/*
- * UnixWare 7+ is known to have a bug in atan2 that will return PI instead
- * of ZERO (0) if the first argument is ZERO(0).
- */
-static double atan2_sco(double x, double y)
-{
- if (x == 0.0)
- return (double)0.0;
- return atan2(x, y);
-}
-#define ATAN2 atan2_sco
-#else
-#define ATAN2 atan2
-#endif
-
/* First, the C functions that do the real work */
/* constants */
@@ -175,7 +159,7 @@ c_log(Py_complex x)
{
Py_complex r;
double l = hypot(x.real,x.imag);
- r.imag = ATAN2(x.imag, x.real);
+ r.imag = atan2(x.imag, x.real);
r.real = log(l);
return r;
}
@@ -191,7 +175,7 @@ c_log10(Py_complex x)
{
Py_complex r;
double l = hypot(x.real,x.imag);
- r.imag = ATAN2(x.imag, x.real)/log(10.);
+ r.imag = atan2(x.imag, x.real)/log(10.);
r.real = log10(l);
return r;
}