[Python-checkins] cpython (merge 3.3 -> default): Merge 3.3.

stefan.krah python-checkins at python.org
Sun Sep 30 09:34:01 CEST 2012


http://hg.python.org/cpython/rev/67930559b2ad
changeset:   79305:67930559b2ad
parent:      79303:65bc6ce16a4e
parent:      79304:ad93862e5c70
user:        Stefan Krah <skrah at bytereef.org>
date:        Sun Sep 30 09:25:34 2012 +0200
summary:
  Merge 3.3.

files:
  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
--- a/Modules/_decimal/tests/bench.py
+++ b/Modules/_decimal/tests/bench.py
@@ -18,8 +18,13 @@
 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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list