[Python-checkins] CVS: python/dist/src/Modules cmathmodule.c,2.26,2.27 mathmodule.c,2.65,2.66

Martin v. L?wis loewis@users.sourceforge.net
Thu, 06 Sep 2001 01:16:19 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv17190/Modules

Modified Files:
	cmathmodule.c mathmodule.c 
Log Message:
Revert parts of patch #453627, documenting the resulting test failures
instead.


Index: cmathmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cmathmodule.c,v
retrieving revision 2.26
retrieving revision 2.27
diff -C2 -d -r2.26 -r2.27
*** cmathmodule.c	2001/09/05 22:36:56	2.26
--- cmathmodule.c	2001/09/06 08:16:17	2.27
***************
*** 9,28 ****
  #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 */
  
--- 9,12 ----
***************
*** 176,180 ****
  	Py_complex r;
  	double l = hypot(x.real,x.imag);
! 	r.imag = ATAN2(x.imag, x.real);
  	r.real = log(l);
  	return r;
--- 160,164 ----
  	Py_complex r;
  	double l = hypot(x.real,x.imag);
! 	r.imag = atan2(x.imag, x.real);
  	r.real = log(l);
  	return r;
***************
*** 192,196 ****
  	Py_complex r;
  	double l = hypot(x.real,x.imag);
! 	r.imag = ATAN2(x.imag, x.real)/log(10.);
  	r.real = log10(l);
  	return r;
--- 176,180 ----
  	Py_complex r;
  	double l = hypot(x.real,x.imag);
! 	r.imag = atan2(x.imag, x.real)/log(10.);
  	r.real = log10(l);
  	return r;

Index: mathmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v
retrieving revision 2.65
retrieving revision 2.66
diff -C2 -d -r2.65 -r2.66
*** mathmodule.c	2001/09/05 22:36:56	2.65
--- mathmodule.c	2001/09/06 08:16:17	2.66
***************
*** 13,32 ****
  #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
--- 13,16 ----
***************
*** 116,120 ****
  FUNC1(atan, atan,
        "atan(x)\n\nReturn the arc tangent (measured in radians) of x.")
! 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.")
--- 100,104 ----
  FUNC1(atan, atan,
        "atan(x)\n\nReturn the arc tangent (measured in radians) of x.")
! 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.")