[Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.59,2.60
Tim Peters
tim_one@users.sourceforge.net
Tue, 07 Aug 2001 15:10:02 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv17751/python/dist/src/Modules
Modified Files:
mathmodule.c
Log Message:
Part of SF patch [#431848] mathmodule.c: doc strings & conversion, from
Peter Schneider-Kamp.
Clarified some docstrings in the spirit of the patch; left out the
degrees() and radians() functions (see the patch comments on SF).
Index: mathmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v
retrieving revision 2.59
retrieving revision 2.60
diff -C2 -d -r2.59 -r2.60
*** mathmodule.c 2001/06/10 16:45:08 2.59
--- mathmodule.c 2001/08/07 22:10:00 2.60
***************
*** 52,56 ****
*/
if (x)
! PyErr_SetString(PyExc_OverflowError,
"math range error");
else
--- 52,56 ----
*/
if (x)
! PyErr_SetString(PyExc_OverflowError,
"math range error");
else
***************
*** 110,124 ****
FUNC1(acos, acos,
! "acos(x)\n\nReturn the arc cosine of x.")
FUNC1(asin, asin,
! "asin(x)\n\nReturn the arc sine of x.")
FUNC1(atan, atan,
! "atan(x)\n\nReturn the arc tangent of x.")
FUNC2(atan2, atan2,
! "atan2(y, x)\n\nReturn atan(y/x).")
FUNC1(ceil, ceil,
! "ceil(x)\n\nReturn the ceiling of x as a real.")
FUNC1(cos, cos,
! "cos(x)\n\nReturn the cosine of x.")
FUNC1(cosh, cosh,
"cosh(x)\n\nReturn the hyperbolic cosine of x.")
--- 110,126 ----
FUNC1(acos, acos,
! "acos(x)\n\nReturn the arc cosine (measured in radians) of x.")
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,
! "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,
! "ceil(x)\n\nReturn the ceiling of x as a float.\n"
! "This is the smallest integral value >= x.")
FUNC1(cos, cos,
! "cos(x)\n\nReturn the cosine of x (measured in radians).")
FUNC1(cosh, cosh,
"cosh(x)\n\nReturn the hyperbolic cosine of x.")
***************
*** 126,132 ****
"exp(x)\n\nReturn e raised to the power of x.")
FUNC1(fabs, fabs,
! "fabs(x)\n\nReturn the absolute value of the real x.")
FUNC1(floor, floor,
! "floor(x)\n\nReturn the floor of x as a real.")
FUNC2(fmod, fmod,
"fmod(x,y)\n\nReturn fmod(x, y), according to platform C."
--- 128,135 ----
"exp(x)\n\nReturn e raised to the power of x.")
FUNC1(fabs, fabs,
! "fabs(x)\n\nReturn the absolute value of the float x.")
FUNC1(floor, floor,
! "floor(x)\n\nReturn the floor of x as a float.\n"
! "This is the largest integral value <= x.")
FUNC2(fmod, fmod,
"fmod(x,y)\n\nReturn fmod(x, y), according to platform C."
***************
*** 140,150 ****
#ifdef MPW_3_1 /* This hack is needed for MPW 3.1 but not for 3.2 ... */
FUNC2(pow, power,
! "pow(x,y)\n\nReturn x**y.")
#else
FUNC2(pow, pow,
! "pow(x,y)\n\nReturn x**y.")
#endif
FUNC1(sin, sin,
! "sin(x)\n\nReturn the sine of x.")
FUNC1(sinh, sinh,
"sinh(x)\n\nReturn the hyperbolic sine of x.")
--- 143,153 ----
#ifdef MPW_3_1 /* This hack is needed for MPW 3.1 but not for 3.2 ... */
FUNC2(pow, power,
! "pow(x,y)\n\nReturn x**y (x to the power of y).")
#else
FUNC2(pow, pow,
! "pow(x,y)\n\nReturn x**y (x to the power of y).")
#endif
FUNC1(sin, sin,
! "sin(x)\n\nReturn the sine of x (measured in radians).")
FUNC1(sinh, sinh,
"sinh(x)\n\nReturn the hyperbolic sine of x.")
***************
*** 152,156 ****
"sqrt(x)\n\nReturn the square root of x.")
FUNC1(tan, tan,
! "tan(x)\n\nReturn the tangent of x.")
FUNC1(tanh, tanh,
"tanh(x)\n\nReturn the hyperbolic tangent of x.")
--- 155,159 ----
"sqrt(x)\n\nReturn the square root of x.")
FUNC1(tan, tan,
! "tan(x)\n\nReturn the tangent of x (measured in radians).")
FUNC1(tanh, tanh,
"tanh(x)\n\nReturn the hyperbolic tangent of x.")
***************
*** 199,203 ****
}
! static char math_ldexp_doc [] =
"ldexp_doc(x, i)\n\
\n\
--- 202,206 ----
}
! static char math_ldexp_doc [] =
"ldexp_doc(x, i)\n\
\n\
***************
*** 271,275 ****
{
PyObject *m, *d, *v;
!
m = Py_InitModule3("math", math_methods, module_doc);
d = PyModule_GetDict(m);
--- 274,278 ----
{
PyObject *m, *d, *v;
!
m = Py_InitModule3("math", math_methods, module_doc);
d = PyModule_GetDict(m);