Message320389
Raymond, I'd say scaling is vital (to prevent spurious infinities), but complications beyond that are questionable, slowing things down for an improvement in accuracy that may be of no actual benefit.
Note that your original "simple homework problems for kids to machine learning and computer vision" doesn't include cases where good-to-the-last-bit accuracy is important, but at least in machine learning and computer vision apps primitives may be called an enormous number of times - "speed matters" to them.
Perhaps add an optional "summer" argument defaulting to __builtins__.sum? Then the user who wants to pay more for tighter error bounds can pass in whatever they like, from a raw Kahan summer, through one of its improvements, to math.fsum. There just isn't a "one size fits all" answer. |
|
Date |
User |
Action |
Args |
2018-06-24 22:13:25 | tim.peters | set | recipients:
+ tim.peters, rhettinger, mark.dickinson, steven.daprano, skrah, serhiy.storchaka |
2018-06-24 22:13:25 | tim.peters | set | messageid: <1529878405.19.0.56676864532.issue33089@psf.upfronthosting.co.za> |
2018-06-24 22:13:25 | tim.peters | link | issue33089 messages |
2018-06-24 22:13:25 | tim.peters | create | |
|