From 41e031004bd156ea579a35d8e1d74cafe8dac3e0 Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Sun, 1 Apr 2012 23:25:34 +0200 Subject: Fix Overflow exception in the bignum factorial benchmark that is due to the recent change of the default value for context.Emax. --- Modules/_decimal/tests/bench.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]: -- cgit v0.12