@@ -1375,16 +1375,13 @@ def run(func, *args):
1375
1375
@support .cpython_only # Other implementations may choose a different algorithm
1376
1376
@support .requires_resource ('cpu' )
1377
1377
def test_sumprod_extended_precision_accuracy (self ):
1378
- sumprod = math .sumprod
1379
1378
import operator
1380
1379
from fractions import Fraction
1381
1380
from itertools import starmap
1382
1381
from collections import namedtuple
1383
- from math import log2 , exp2 , log10 , fabs
1382
+ from math import log2 , exp2 , fabs
1384
1383
from random import choices , uniform , shuffle
1385
1384
from statistics import median
1386
- from functools import partial
1387
- from pprint import pp
1388
1385
1389
1386
DotExample = namedtuple ('DotExample' , ('x' , 'y' , 'target_sumprod' , 'condition' ))
1390
1387
@@ -1452,7 +1449,7 @@ def Trial(dotfunc, c, n):
1452
1449
n = 20 # Length of vectors
1453
1450
c = 1e30 # Target condition number
1454
1451
1455
- relative_err = median (Trial (sumprod , c , n ) for i in range (times ))
1452
+ relative_err = median (Trial (math . sumprod , c , n ) for i in range (times ))
1456
1453
self .assertLess (relative_err , 1e-16 )
1457
1454
1458
1455
def testModf (self ):
0 commit comments