Warren Weckesser <warren.weckes...@gmail.com> added the comment:
On 10/9/19, Mark Dickinson <rep...@bugs.python.org> wrote: > > Mark Dickinson <dicki...@gmail.com> added the comment: > >> In [20]: harmonic_mean([math.nan, 0]) >> >> Out[20]: 0 > > That one seems excusable, for the same sort of reasons that IEEE 754 > specifies that hypot(nan, inf) is inf rather than nan. Similarly, sumSquare > and sumAbs from IEEE 754-2008 specify that infinities take precedence over > NaNs, on the basis that the result doesn't change if the nan is replaced > with any non-nan value. > A belated "thanks", Mark. I wasn't aware of that, but it makes sense. Warren > ---------- > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue38382> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38382> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com