Message355915
On 10/9/19, Mark Dickinson <report@bugs.python.org> wrote:
>
> Mark Dickinson <dickinsm@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 <report@bugs.python.org>
> <https://bugs.python.org/issue38382>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2019-11-04 00:29:20 | WarrenWeckesser | set | recipients:
+ WarrenWeckesser, tim.peters, rhettinger, mark.dickinson, taleinat, steven.daprano, gaoxinge |
2019-11-04 00:29:20 | WarrenWeckesser | link | issue38382 messages |
2019-11-04 00:29:19 | WarrenWeckesser | create | |
|