]> granicus.if.org Git - python/commitdiff
Fix Overflow exception in the bignum factorial benchmark that is due to
authorStefan Krah <skrah@bytereef.org>
Sun, 1 Apr 2012 21:25:34 +0000 (23:25 +0200)
committerStefan Krah <skrah@bytereef.org>
Sun, 1 Apr 2012 21:25:34 +0000 (23:25 +0200)
the recent change of the default value for context.Emax.

Modules/_decimal/tests/bench.py

index 013f0f666bbdab4c148cb74c8bcaac9320b978d2..ea0823a0da82ab0e562986acf916a511bdc7ba0c 100644 (file)
@@ -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]: