Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6503

Re: float("nan") in set or as key

Date 2011-05-28 17:44 -0700
From Erik Max Francis <max@alcyone.com>
Organization Alcyone Systems
Newsgroups comp.lang.python
Subject Re: float("nan") in set or as key
References <4DE1881C.8000701@mrabarnett.plus.com> <mailman.2207.1306628936.9059.python-list@python.org>
Message-ID <lNCdnTKgpp6VCnzQnZ2dnUVZ5sOdnZ2d@giganews.com> (permalink)

Show all headers | View raw


Albert Hopkins wrote:
> On Sun, 2011-05-29 at 00:41 +0100, MRAB wrote:
>>>> 1.0 == 1.0
> True
>>>> float("nan") == float("nan")
> False
> 
> I can't cite this in a spec, but it makes sense (to me) that two things
> which are nan are not necessarily the same nan.

It's part of the IEEE standard.

-- 
Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
  San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
   There was never a good war or a bad peace.
    -- Benjamin Franklin, 1706-1790

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: float("nan") in set or as key Albert Hopkins <marduk@letterboxes.org> - 2011-05-28 20:28 -0400
  Re: float("nan") in set or as key Erik Max Francis <max@alcyone.com> - 2011-05-28 17:44 -0700
  Re: float("nan") in set or as key Grant Edwards <invalid@invalid.invalid> - 2011-05-29 02:25 +0000
    Re: float("nan") in set or as key Wolfgang Rohdewald <wolfgang@rohdewald.de> - 2011-05-29 10:27 +0200
      Re: float("nan") in set or as key Grant Edwards <invalid@invalid.invalid> - 2011-05-29 14:41 +0000
        Re: float("nan") in set or as key MRAB <python@mrabarnett.plus.com> - 2011-05-29 18:44 +0100
          Re: float("nan") in set or as key Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-29 18:27 +0000
        Re: float("nan") in set or as key Chris Angelico <rosuav@gmail.com> - 2011-05-30 03:50 +1000
        Re: float("nan") in set or as key Christian Heimes <lists@cheimes.de> - 2011-05-29 20:05 +0200
          Re: float("nan") in set or as key Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-29 18:46 +0000
        Re: float("nan") in set or as key Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-05-29 20:36 -0700

csiph-web