Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #48245
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.004 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'float': 0.07; "subject:' ": 0.07; 'suppose': 0.07; 'bits': 0.09; 'correct,': 0.09; 'operator,': 0.09; 'python': 0.11; 'stored': 0.12; "wouldn't": 0.14; 'distinct': 0.16; 'finite': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'nans': 0.16; 'simpson': 0.16; 'sat,': 0.16; 'all.': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'memory': 0.22; '(in': 0.22; 'python?': 0.22; 'recognize': 0.24; '15,': 0.26; 'least': 0.26; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; '(although': 0.31; 'ctypes': 0.31; "d'aprano": 0.31; 'gather': 0.31; 'steven': 0.31; 'figure': 0.32; 'everyone': 0.33; 'not.': 0.33; "i'd": 0.34; 'could': 0.34; 'subject:with': 0.35; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'false': 0.36; 'right?': 0.36; 'possible': 0.36; 'received:209': 0.37; 'to:addr:python- list': 0.38; 'fact': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'telling': 0.64; 'more': 0.64; 'different': 0.65; 'direct': 0.67; 'detail.': 0.68; 'calculations': 0.84; 'differences': 0.93; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=taITw28f1I5+jafJhUPQrv2P5JTE9lvjq7jTG4mC2cY=; b=rYFeg4B0Qcoi7+9MwBWQ82qCaVTGW9ltuIpyr3EdBWsaNqfeMdmQtgQUMhYgNQ9mii hfGoEsxaiXyRcJRFIgZZ/d/DupLWaOTG/eNwrIk4pJVjsyNXdEWWeHY6lLdDGr4iL09W le1ziJEYTVxEsahFL4eQiS8s7YunwHOCQtOH1fU3LeBxz6tqaJajnPmKpoLBz2jPHwoo Dw6WSYFFzLHcFuHE94RoyK26u2688UfSEJs4R+OhBCRHVJCxb+TYOAfUItKDVDuOrRv/ XNCUOVNHROqbGa30G98rZBkSumDRx7hRI6sYyvkEJj0KnrkfeLBKxH1rZgpfTaTqKuBI VskA== |
| MIME-Version | 1.0 |
| X-Received | by 10.58.214.105 with SMTP id nz9mr1751374vec.58.1371262909263; Fri, 14 Jun 2013 19:21:49 -0700 (PDT) |
| In-Reply-To | <20130615020308.GA71299@cskk.homeip.net> |
| References | <51bbc49f$0$29997$c3e8da3$5496439d@news.astraweb.com> <20130615020308.GA71299@cskk.homeip.net> |
| Date | Sat, 15 Jun 2013 12:21:49 +1000 |
| Subject | Re: Eval of expr with 'or' and 'and' within |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3354.1371262918.3114.python-list@python.org> (permalink) |
| Lines | 28 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1371262918 news.xs4all.nl 15883 [2001:888:2000:d::a6]:51229 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:48245 |
Show key headers only | View raw
On Sat, Jun 15, 2013 at 12:03 PM, Cameron Simpson <cs@zip.com.au> wrote:
> On 15Jun2013 01:34, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:
> | Everyone is aware that there is more than one NAN, right?
>
> I was not. Interesting.
>
> | If my
> | calculations are correct, there are 9007199254740992 distinct float NANs
> | in Python (although there is no direct way of distinguishing them).
>
> Wouldn't id() do it? At least in terms of telling them apart?
> I gather they're not inspectable in Python?
You could recognize one float object as distinct from another, but
that's true of all floats:
>>> float("1.0") is float("1.0")
False
All NaNs are different in terms of the == operator, so conceptually
there are an infinite number of unique NaNs. The fact that they're
stored in memory using a certain number of bits means that there must
be a finite number of possible representations, but that's really an
implementation detail. I suppose you could figure out the
representation differences by fiddling with ctypes (in C I'd just use
a union), but that's really all.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-14 12:50 +0300
Re: Eval of expr with 'or' and 'and' within Fábio Santos <fabiosantosart@gmail.com> - 2013-06-14 11:03 +0100
Re: Eval of expr with 'or' and 'and' within Robert Kern <robert.kern@gmail.com> - 2013-06-14 11:14 +0100
Re: Eval of expr with 'or' and 'and' within Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-14 16:09 +0000
Re: Eval of expr with 'or' and 'and' within rusi <rustompmody@gmail.com> - 2013-06-14 09:21 -0700
Re: Eval of expr with 'or' and 'and' within Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-06-14 20:03 +0200
Re: Eval of expr with 'or' and 'and' within rusi <rustompmody@gmail.com> - 2013-06-14 11:37 -0700
Re: Eval of expr with 'or' and 'and' within Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-14 19:47 +0100
Re: Eval of expr with 'or' and 'and' within alex23 <wuwei23@gmail.com> - 2013-06-14 23:50 -0700
Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 10:04 +0300
Re: Eval of expr with 'or' and 'and' within Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-15 07:49 +0000
Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 10:59 +0300
Re: Eval of expr with 'or' and 'and' within Grant Edwards <invalid@invalid.invalid> - 2013-06-14 14:49 +0000
Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-14 18:16 +0300
Re: Eval of expr with 'or' and 'and' within Nobody <nobody@nowhere.com> - 2013-06-14 17:42 +0100
Re: Eval of expr with 'or' and 'and' within Grant Edwards <invalid@invalid.invalid> - 2013-06-14 19:30 +0000
Re: Eval of expr with 'or' and 'and' within Nobody <nobody@nowhere.com> - 2013-06-15 00:02 +0100
Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 10:57 +0300
Re: Eval of expr with 'or' and 'and' within Michael Torrie <torriem@gmail.com> - 2013-06-14 10:29 -0600
Re: Eval of expr with 'or' and 'and' within Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-14 16:49 +0000
Re: Eval of expr with 'or' and 'and' within Michael Torrie <torriem@gmail.com> - 2013-06-14 11:28 -0600
Re: Eval of expr with 'or' and 'and' within MRAB <python@mrabarnett.plus.com> - 2013-06-14 18:49 +0100
Re: Eval of expr with 'or' and 'and' within Chris Angelico <rosuav@gmail.com> - 2013-06-15 03:56 +1000
Re: Eval of expr with 'or' and 'and' within Grant Edwards <invalid@invalid.invalid> - 2013-06-14 19:33 +0000
Re: Eval of expr with 'or' and 'and' within Chris Angelico <rosuav@gmail.com> - 2013-06-15 09:56 +1000
Re: Eval of expr with 'or' and 'and' within Nobody <nobody@nowhere.com> - 2013-06-15 00:09 +0100
Re: Eval of expr with 'or' and 'and' within Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-15 01:34 +0000
Re: Eval of expr with 'or' and 'and' within Cameron Simpson <cs@zip.com.au> - 2013-06-15 12:03 +1000
NANs [was Re: Eval of expr with 'or' and 'and' within] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-15 04:22 +0000
Re: Eval of expr with 'or' and 'and' within Chris Angelico <rosuav@gmail.com> - 2013-06-15 12:21 +1000
Re: Eval of expr with 'or' and 'and' within Nobody <nobody@nowhere.com> - 2013-06-15 00:06 +0100
Re: Eval of expr with 'or' and 'and' within MRAB <python@mrabarnett.plus.com> - 2013-06-15 01:26 +0100
Re: Eval of expr with 'or' and 'and' within Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-06-14 09:47 -0700
Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-14 20:01 +0300
Re: Eval of expr with 'or' and 'and' within Robert Kern <robert.kern@gmail.com> - 2013-06-14 18:27 +0100
Re: Eval of expr with 'or' and 'and' within Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-06-14 22:05 +0300
Re: Eval of expr with 'or' and 'and' within Grant Edwards <invalid@invalid.invalid> - 2013-06-14 19:36 +0000
Re: Eval of expr with 'or' and 'and' within Cameron Simpson <cs@zip.com.au> - 2013-06-15 10:14 +1000
Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 11:20 +0300
Re: Eval of expr with 'or' and 'and' within Lele Gaifax <lele@metapensiero.it> - 2013-06-15 11:48 +0200
Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 16:24 +0300
Re: Eval of expr with 'or' and 'and' within Nick the Gr33k <support@superhost.gr> - 2013-06-15 16:28 +0300
csiph-web