Message333090
I'd like to divorce `prod()` from floating-point complications. The `sum()` builtin has proved extremely handy, even for floats, in large part because it's type-agnostic and straightforward. While I'd usually use `prod()` on ints and Fractions, in almost all cases I have for multiplying floats a dirt simple implementation would work fine too (e.g., I don't multiply NaNs or infinities to begin with, overflow and underflow can't occur in context, and I usually couldn't care less about the accuracy of the trailing bits).
Not that floats should suffer benign neglect forever, but heroically complex - and expensive - float implementations should get their own function, like `fprod()` (like they got their own `fsum()` function). Likewise if, e.g., someone wants an `iprod()` that makes heroic efforts to reorder partial products to speed multiplying sequences of giant integers, or `matprod()` to re-associate matrix multiplications in an optimal way, or ... |
|
Date |
User |
Action |
Args |
2019-01-06 06:27:00 | tim.peters | set | recipients:
+ tim.peters, aleax, rhettinger, mark.dickinson, pitrou, vstinner, serhiy.storchaka, remi.lapeyre, xtreak |
2019-01-06 06:26:58 | tim.peters | set | messageid: <1546756018.68.0.673382172365.issue35606@roundup.psfhosted.org> |
2019-01-06 06:26:58 | tim.peters | link | issue35606 messages |
2019-01-06 06:26:58 | tim.peters | create | |
|