summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-09-06 08:16:17 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-09-06 08:16:17 (GMT)
commit387c547fd38d321e42bf202c166e9403e7ee9b61 (patch)
tree294ec439e64649ee93b41631cc10646d6cc9dfb5 /Modules
parentc2d272a1d553e0650b0ea6aa6d31a04e42d5bd7d (diff)
downloadcpython-387c547fd38d321e42bf202c166e9403e7ee9b61.zip
cpython-387c547fd38d321e42bf202c166e9403e7ee9b61.tar.gz
cpython-387c547fd38d321e42bf202c166e9403e7ee9b61.tar.bz2
Revert parts of patch #453627, documenting the resulting test failures
instead.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/cmathmodule.c20
-rw-r--r--Modules/mathmodule.c18
2 files changed, 3 insertions, 35 deletions
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index 34b0ce8..adf76b8 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;
}
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 379fecb..4609f60 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -12,22 +12,6 @@ extern double modf (double, double *);
#endif /* __STDC__ */
#endif /* _MSC_VER */
-#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
-
/* Call is_error when errno != 0, and where x is the result libm
* returned. is_error will usually set up an exception and return
* true (1), but may return false (0) without setting up an exception.
@@ -115,7 +99,7 @@ FUNC1(asin, asin,
"asin(x)\n\nReturn the arc sine (measured in radians) of x.")
FUNC1(atan, atan,
"atan(x)\n\nReturn the arc tangent (measured in radians) of x.")
-FUNC2(atan2, ATAN2,
+FUNC2(atan2, atan2,
"atan2(y, x)\n\nReturn the arc tangent (measured in radians) of y/x.\n"
"Unlike atan(y/x), the signs of both x and y are considered.")
FUNC1(ceil, ceil,