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


Groups > comp.lang.python > #74203

Re: NaN comparisons - Call For Anecdotes

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <2014@jmunch.dk>
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; 'anders': 0.09; 'linear': 0.09; 'propagate': 0.09; 'run,': 0.09; 'things,': 0.09; 'to:addr:pobox.com': 0.09; 'to:addr:skip': 0.09; 'cc:addr:python- list': 0.11; 'fancy': 0.16; 'nan': 0.16; 'propagated': 0.16; 'sorts': 0.16; 'exception': 0.16; 'written,': 0.19; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'certainly': 0.24; 'skip': 0.24; 'cc:2**0': 0.24; 'header:In- Reply-To:1': 0.27; 'generally': 0.29; "doesn't": 0.30; 'code': 0.31; 'bad.': 0.31; 'crash': 0.31; 'received:dk': 0.31; 'quite': 0.32; 'community': 0.33; 'running': 0.33; 'computing': 0.35; 'add': 0.35; 'there': 0.35; 'raising': 0.36; 'doing': 0.36; 'wrong': 0.37; 'branch': 0.38; 'header:Return-path:1': 0.60; 'simply': 0.61; 'more': 0.64; 'different': 0.65; 'subject:For': 0.78
Date Tue, 08 Jul 2014 21:06:06 +0200
From "Anders J. Munch" <2014@jmunch.dk>
Organization .
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version 1.0
To Skip Montanaro <skip@pobox.com>
Subject Re: NaN comparisons - Call For Anecdotes
References <53BC05FB.4050707@jmunch.dk> <CANc-5UyhxwkRZ=_yKdYzdefN5BnoY1HgsXidk4xGQDVd+wUJ_A@mail.gmail.com>
In-Reply-To <CANc-5UyhxwkRZ=_yKdYzdefN5BnoY1HgsXidk4xGQDVd+wUJ_A@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Cc Python <python-list@python.org>
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11655.1404846372.18130.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404846372 news.xs4all.nl 2888 [2001:888:2000:d::a6]:55023
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:74203

Show key headers only | View raw


Den 14-07-08 19:23, Skip Montanaro skrev:
>
> In addition to what others have written, I will add one thing. There
> are certainly situations where raising an exception is bad. Consider
> all the people in the scientific computing community doing fancy
> linear algebra sorts of things, often with missing data. They
> generally want NaN propagated and not have some long running
> calculation crash in the middle.

NaN!=NaN doesn't cause NaN's to propagate any more or any less. It simply causes 
a different branch of code to run, quite often the wrong one.

regards, Anders

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


Thread

Re: NaN comparisons - Call For Anecdotes "Anders J. Munch" <2014@jmunch.dk> - 2014-07-08 21:06 +0200

csiph-web