Vedran Čačić <ved...@gmail.com> added the comment: inf and -inf are really two different values (in the scope of the standard). Same as 5. and -5., or even 0. and -0. They behave differently in some exactly specified operations, and it is useful.
Are there any exactly specified operations whose specifications require the unequal treatment of nans with + and - signs? I don't think so, since it goes against the whole idea of nan as an unspecified number. (If you want to track its _history_, that's what payload is for.) My interpretation is that nan can have a sign bit only so unary minus and absolute value can be implemented quicker (without having to check whether the input is nan) -- not because it carries any useful semantics within the standard. ---------- nosy: +veky _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42210> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com