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 /Lib/test/test_math.py | |
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 'Lib/test/test_math.py')
-rw-r--r-- | Lib/test/test_math.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 6d6bc44..aec4927 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -129,6 +129,12 @@ testit('pow(1,0)', math.pow(1,0), 1) testit('pow(2,1)', math.pow(2,1), 2) testit('pow(2,-1)', math.pow(2,-1), 0.5) +print 'rint' +testit('rint(0.7)', math.rint(0.7), 1) +testit('rint(-0.3)', math.rint(-0.3), 0) +testit('rint(2.5)', math.rint(2.5), 2) +testit('rint(3.5)', math.rint(3.5), 4) + print 'sin' testit('sin(0)', math.sin(0), 0) testit('sin(pi/2)', math.sin(math.pi/2), 1) |