[Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.43,2.44
Guido van Rossum
python-dev@python.org
Thu, 11 May 2000 14:19:45 -0400 (EDT)
Update of /projects/cvsroot/python/dist/src/Modules
In directory eric:/projects/python/develop/guido/src/Modules
Modified Files:
mathmodule.c
Log Message:
Added math.rint() -- round according to current IEEE754 mode
Index: mathmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/mathmodule.c,v
retrieving revision 2.43
retrieving revision 2.44
diff -C2 -r2.43 -r2.44
*** mathmodule.c 2000/05/08 14:29:38 2.43
--- mathmodule.c 2000/05/11 18:19:42 2.44
***************
*** 157,160 ****
--- 157,162 ----
"pow(x,y)\n\nReturn x**y.")
#endif
+ FUNC1(math_rint, rint, math_rint_doc,
+ "rint(x)\n\nReturn the integer nearest to x as a real.")
FUNC1(math_sin, sin, math_sin_doc,
"sin(x)\n\nReturn the sine of x.")
***************
*** 268,271 ****
--- 270,274 ----
{"modf", math_modf, 0, math_modf_doc},
{"pow", math_pow, 0, math_pow_doc},
+ {"rint", math_rint, 0, math_rint_doc},
{"sin", math_sin, 0, math_sin_doc},
{"sinh", math_sinh, 0, math_sinh_doc},