On 2019-02-13, Schachner, Joseph <joseph.schach...@teledyne.com> wrote:
> This makes some sense because NAN is Not A Number, so any comparison > to a number fails. Ah, but you now seem to be conflating "comparison fails" with "comparison has a boolean value of False". The alternative to (nan == nan) => False is probably not (nan == nan) => True: it's (nan == nan) => exception. Towards that end, the IEEE standard provides for something called a "signalling NaN". I'm not aware of any Python implementations that support signalling NaNs. Floating point is sort of the quantum mechanics of computer science. At first glance, it seems sort of weird. But after you work with it a while, it gets even worse. -- Grant Edwards grant.b.edwards Yow! Jesuit priests are at DATING CAREER DIPLOMATS!! gmail.com -- https://mail.python.org/mailman/listinfo/python-list