[Python-Dev] Why is nan != nan?

Jesus Cea jcea at jcea.es
Fri Mar 26 02:37:48 CET 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/26/2010 01:57 AM, Steven D'Aprano wrote:

> In fact, identity of NANs is itself an implementation quirk of 
> programming languages like Python: logically, NANs don't have identity 
> at all.
> 
> To put it another way: all ONEs are the same ONE, even if they come from 
> different sources, are in different memory locations, or have different 
> identities; but all NANs are different, even if they come from the same 
> source, are in the same memory location, or have the same identity.

+inf. Bravo!.

:-)

- -- 
Jesus Cea Avion                         _/_/      _/_/_/        _/_/_/
jcea at jcea.es - http://www.jcea.es/     _/_/    _/_/  _/_/    _/_/  _/_/
jabber / xmpp:jcea at jabber.org         _/_/    _/_/          _/_/_/_/_/
.                              _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQCVAwUBS6wP7Jlgi5GaxT1NAQJXFgP+KHshsGGOM1GO/f1lEazul1+vipw6tUuF
Hf8Pm39srX3pKV7OUabWJWBaRURnJWIHEymjwILBwVo9X4604klbTRi3MrqbOeZv
G8NFeMzagXLwEOlAnPbVcfDb3KcW4C/Zm0A5TOPY4X5T/8FRmhfbrC4Ip2klyyMh
24fGUWTr5DI=
=d1RL
-----END PGP SIGNATURE-----


More information about the Python-Dev mailing list