Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

The idea of math.ieee754_total_order looks interesting, but how would it work 
with min/max?

In 
https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/minNum_maxNum_Removal_Demotion_v3.pdf
 there is a comparison of several standards and implementations of symmetric 
and associative min/max. There are two options: propagate NaN and ignore it 
(treat it as missing data). It differs between different standards and 
implementations but in particular standard or implementation the same rule is 
used for min and max.

* If ieee754_total_order(NAN) < ieee754_total_order(1), then min(1, NAN) -> NAN 
("propagate") and max(1, NAN) -> 1 ("missing data").
* If ieee754_total_order(NAN) > ieee754_total_order(1), then min(1, NAN) -> 1 
("missing data") and max(1, NAN) -> NAN ("propagate").

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44370>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to