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 Subject: Re: NaN comparisons - Call For Anecdotes References: <53BC05FB.4050707@jmunch.dk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Python X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 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 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