diff options
author | Stefan Krah <skrah@bytereef.org> | 2012-04-01 21:25:34 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2012-04-01 21:25:34 (GMT) |
commit | 41e031004bd156ea579a35d8e1d74cafe8dac3e0 (patch) | |
tree | 9e788a19a81993c9eb54f85be6feb8a83040e324 /Modules/_decimal | |
parent | 8dbbae990c28c31f54d26f2e50c2155fd9e9b084 (diff) | |
download | cpython-41e031004bd156ea579a35d8e1d74cafe8dac3e0.zip cpython-41e031004bd156ea579a35d8e1d74cafe8dac3e0.tar.gz cpython-41e031004bd156ea579a35d8e1d74cafe8dac3e0.tar.bz2 |
Fix Overflow exception in the bignum factorial benchmark that is due to
the recent change of the default value for context.Emax.
Diffstat (limited to 'Modules/_decimal')
-rw-r--r-- | Modules/_decimal/tests/bench.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_decimal/tests/bench.py b/Modules/_decimal/tests/bench.py index 013f0f6..ea0823a 100644 --- a/Modules/_decimal/tests/bench.py +++ b/Modules/_decimal/tests/bench.py @@ -84,7 +84,10 @@ print("\n# ===================================================================== print("# Factorial") print("# ======================================================================\n") -C.getcontext().prec = C.MAX_PREC +c = C.getcontext() +c.prec = C.MAX_PREC +c.Emax = C.MAX_EMAX +c.Emin = C.MIN_EMIN for n in [100000, 1000000]: |