Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.news-service.com!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'wed,': 0.03; 'instance,': 0.05; 'python': 0.08; 'pm,': 0.10; 'received:209.85.214.174': 0.14; 'received:mail-iw0-f174.google.com': 0.14; 'wrote:': 0.14; "'int'": 0.16; "'long'": 0.16; '12:59': 0.16; 'angelico': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'integer.': 0.16; 'okay,': 0.16; 'simulate': 0.16; 'subject:key': 0.16; 'subject:set': 0.16; 'value",': 0.16; 'question.': 0.16; 'meant': 0.18; 'header:In-Reply-To:1': 0.21; 'seems': 0.21; 'sunday,': 0.23; "i'm": 0.27; 'message-id:@mail.gmail.com': 0.28; 'received:209.85.214': 0.28; 'carl': 0.30; 'define': 0.31; 'does': 0.33; 'to:addr:python-list': 0.33; 'chris': 0.34; 'normally': 0.34; 'there': 0.35; 'numbers.': 0.35; 'hold': 0.36; 'received:google.com': 0.37; 'received:209.85': 0.37; 'floating': 0.37; 'note,': 0.37; 'case': 0.37; 'data': 0.38; 'hardware': 0.38; 'subject:: ': 0.38; 'some': 0.38; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'glad': 0.66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=HFuxOkF/JG/1STM+OttBXZWZuAhJFR/ak7cPJYTyuLY=; b=osN4spaJMhVOxQIePVUeK49fONm7ferwWi6q5WKgYtXKztci/Jv/gUwbPUNDtGn0kl L4FI5eB2NmuhmOX0m2PbTOqqw5uvHEJdgE7ijb51f//gVkpOBCgN4XJ8hk341je6ixd6 kyzOQ1+fY8+SydUY1UHVRcIOnfmDy6alKtljI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=S/GCcYBbFPK9CeosCQCq4m9UX7FVyfv81xE66anT4m+ahwR89Ml/rYwwNHRt5u6Cs3 aEBR0RoyqeKa9sqkb4FRPWTu7bwEcnkxDcrmvuWZEpCg5HErFfyuv9Ts72Ys3AYf81TR dl1zHyfGKNv2bQXILWRW9GTbObh5CeKeHvIyo= MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 1 Jun 2011 13:05:43 +1000 Subject: Re: float("nan") in set or as key From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306897553 news.xs4all.nl 49182 [::ffff:82.94.164.166]:40509 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6777 On Wed, Jun 1, 2011 at 12:59 PM, Carl Banks wrot= e: > On Sunday, May 29, 2011 7:53:59 PM UTC-7, Chris Angelico wrote: >> Okay, here's a question. The Python 'float' value - is it meant to be >> "a Python representation of an IEEE double-precision floating point >> value", or "a Python representation of a real number"? > > The former. =A0Unlike the case with integers, there is no way that I know= of to represent an abstract real number on a digital computer. This seems peculiar. Normally Python seeks to define its data types in the abstract and then leave the concrete up to the various implementations - note, for instance, how Python 3 has dispensed with 'int' vs 'long' and just made a single 'int' type that can hold any integer. Does this mean that an implementation of Python on hardware that has some other type of floating point must simulate IEEE double-precision in all its nuances? I'm glad I don't often need floating point numbers. They can be so annoying= ! Chris Angelico