diff options
author | Stefan Krah <skrah@bytereef.org> | 2012-09-30 07:25:34 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2012-09-30 07:25:34 (GMT) |
commit | 2118a01ef9eea51bff8e1df2fc3f83e9014fb8a6 (patch) | |
tree | 1170d67119a59f71e5d7e32820dfeae5f0fe7efa /Modules | |
parent | b80f511a8bd6e0708b6915026681906d6f12ae11 (diff) | |
parent | 9a3f05e60f7c620404ddb63dc1ef48b4a11ad78f (diff) | |
download | cpython-2118a01ef9eea51bff8e1df2fc3f83e9014fb8a6.zip cpython-2118a01ef9eea51bff8e1df2fc3f83e9014fb8a6.tar.gz cpython-2118a01ef9eea51bff8e1df2fc3f83e9014fb8a6.tar.bz2 |
Merge 3.3.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_decimal/tests/bench.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/_decimal/tests/bench.py b/Modules/_decimal/tests/bench.py index 7ab6b44..7e4a210 100644 --- a/Modules/_decimal/tests/bench.py +++ b/Modules/_decimal/tests/bench.py @@ -18,8 +18,13 @@ except ImportError: C = import_fresh_module('decimal', fresh=['_decimal']) P = import_fresh_module('decimal', blocked=['_decimal']) - -# Pi function from the decimal.py documentation +# +# NOTE: This is the pi function from the decimal documentation, modified +# for benchmarking purposes. Since floats do not have a context, the higher +# intermediate precision from the original is NOT used, so the modified +# algorithm only gives an approximation to the correctly rounded result. +# For serious use, refer to the documentation or the appropriate literature. +# def pi_float(): """native float""" lasts, t, s, n, na, d, da = 0, 3.0, 3, 1, 0, 0, 24 |