Message374745
The existing math.prod() already has a separate code path for floats. The proposal is to add an overflow/underflow check to that existing path so that we don't get nonsense like 0.0, 1e+175, or Inf depending on the data ordering. That doesn't warrant a separate function.
FWIW fsum() is a separate function for several reasons, none of which apply to the current proposal: 1) we didn't already have a math.sum(). 2) All inputs types get converted to float. 3) Even in common cases, it is measurably slower that sum(). 4) It has a different signature than sum(). |
|
Date |
User |
Action |
Args |
2020-08-03 17:27:23 | rhettinger | set | recipients:
+ rhettinger, tim.peters, mark.dickinson, veky, pablogsal |
2020-08-03 17:27:23 | rhettinger | set | messageid: <1596475643.81.0.0600852032667.issue41458@roundup.psfhosted.org> |
2020-08-03 17:27:23 | rhettinger | link | issue41458 messages |
2020-08-03 17:27:23 | rhettinger | create | |
|