Returning a NaN by default has the advantage of being consistent with IEEE 754 semantics for sequence-based operations (like `sum` and `dot`) and with existing Python `math` module functions like `fsum`, `prod` and `hypot`. In IEEE 754, the majority of operations silently return a NaN (not signalling any floating-point exception) when given a NaN as input. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/LOU72IHABAAMZZ2YHN2TCLKPHKRZDGEP/ Code of Conduct: http://python.org/psf/codeofconduct/
- [Python-ideas] Re: NAN handli... Marc-Andre Lemburg
- [Python-ideas] Re: NAN handli... David Mertz, Ph.D.
- [Python-ideas] Re: NAN handli... Marc-Andre Lemburg
- [Python-ideas] Re: NAN handli... Steven D'Aprano
- [Python-ideas] Re: NAN handling i... Serhiy Storchaka
- [Python-ideas] Re: NAN handli... Marc-Andre Lemburg
- [Python-ideas] Re: NAN handling in statist... Steven D'Aprano
- [Python-ideas] Re: NAN handling in sta... Marc-Andre Lemburg
- [Python-ideas] Re: NAN handling i... Richard Damon
- [Python-ideas] Re: NAN handli... Marc-Andre Lemburg
- [Python-ideas] Re: NAN handling in statistics functions Mark Dickinson
- [Python-ideas] Re: NAN handling in statistics functions Brendan Barnwell
- [Python-ideas] Re: NAN handling in statistics func... Jeff Allen
- [Python-ideas] Re: NAN handling in statistics ... Christopher Barker
- [Python-ideas] Re: NAN handling in statist... Finn Mason
- [Python-ideas] Re: NAN handling in sta... Cameron Simpson
- [Python-ideas] Re: NAN handling i... tritium-list
- [Python-ideas] Re: NAN handli... Steven D'Aprano
- [Python-ideas] Re: NAN handli... Chris Angelico
- [Python-ideas] Re: NAN handli... MRAB
- [Python-ideas] Re: NAN handling in statistics functions Steven D'Aprano