diff options
author | Guido van Rossum <guido@python.org> | 2000-05-11 18:19:42 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-05-11 18:19:42 (GMT) |
commit | 71260b846e9ecafb21e52fd3f5b9ac74ebc8c1e6 (patch) | |
tree | 5022e60cabc3d790df52410d7d73cff56c058d23 /Modules | |
parent | dab6cb8f6dacc107e9482976ca2f8e0313f05131 (diff) | |
download | cpython-71260b846e9ecafb21e52fd3f5b9ac74ebc8c1e6.zip cpython-71260b846e9ecafb21e52fd3f5b9ac74ebc8c1e6.tar.gz cpython-71260b846e9ecafb21e52fd3f5b9ac74ebc8c1e6.tar.bz2 |
Added math.rint() -- round according to current IEEE754 mode
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/mathmodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index d01de90..e76a32c 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -156,6 +156,8 @@ FUNC2(math_pow, power, math_pow_doc, FUNC2(math_pow, pow, math_pow_doc, "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.") FUNC1(math_sinh, sinh, math_sinh_doc, @@ -267,6 +269,7 @@ static PyMethodDef math_methods[] = { {"log10", math_log10, 0, math_log10_doc}, {"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}, {"sqrt", math_sqrt, 0, math_sqrt_doc}, |