Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
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(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41458> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com