Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fdn.fr!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.083 X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; 'scipy': 0.05; 'overflow': 0.09; 'cc:addr:python-list': 0.11; 'elsewhere.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'nan': 0.16; 'sorts': 0.16; 'wrote:': 0.18; 'numerical': 0.19; 'examples': 0.20; 'example': 0.22; 'cc:addr:python.org': 0.22; 'instance,': 0.24; 'regardless': 0.24; 'cc:2**0': 0.24; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'such.': 0.31; 'writes:': 0.31; 'allows': 0.31; 'fri,': 0.33; "i'd": 0.34; 'but': 0.35; 'received:google.com': 0.35; 'too': 0.37; 'rather': 0.38; 'little': 0.38; 'stock': 0.39; 'use.': 0.39; 'sure': 0.39; 'users': 0.40; 'is.': 0.60; 'further': 0.61; 'design,': 0.64; 'more': 0.64; 'jul': 0.74; 'special': 0.74; 'subject:For': 0.78; 'yourself': 0.78; '"not': 0.84; 'calculations': 0.84; 'etc,': 0.84; 'to:none': 0.92 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:cc :content-type; bh=lAs661He/a0HnwqyvqO876iYY4j32aa8+4Lbthwazio=; b=hoH9PPZUSYjmHlR4DNmD9tj2yxcVefdlSpI05lRMObXYuffcOgVytHZArQOkuNGuZU wT5oUdwBsgrW/g+Q1/ASolqY+l8WGJVO+sevnjdfXygdmLW2SAVBShXIa6muNj4okD2L 9TWZRrvcVBHo/MV/LDvfCvIuLTnejysRpacaeIP4KgA2DRWr5RtMzTOWVvzsijTjfCll Mej1kcXx7N1XuAAQ//xPRxmZZDnMw9+7e6alJbrz8m5tck5yzXgn7Os1TI7o0AbHcloz zJZMeLnAtikOTF/9wIA7WWalRf/xf+WKxyDPVP2tL97363BL7nDDvmyufzt/qkwdQVRX z1dg== MIME-Version: 1.0 X-Received: by 10.220.195.67 with SMTP id eb3mr26918120vcb.30.1405623340429; Thu, 17 Jul 2014 11:55:40 -0700 (PDT) In-Reply-To: References: <53BC05FB.4050707@jmunch.dk> <53BD70F4.4000504@stoneleaf.us> <53BDAF90.8010709@jmunch.dk> Date: Fri, 18 Jul 2014 04:55:40 +1000 Subject: Re: NaN comparisons - Call For Anecdotes From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1405623342 news.xs4all.nl 2924 [2001:888:2000:d::a6]:51447 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74675 On Fri, Jul 18, 2014 at 4:49 AM, Johann Hibschman wrote: > Chris Angelico writes: > >> But you also don't know that he hasn't. NaN doesn't mean "unknown", it >> means "Not a Number". You need a more sophisticated system that allows >> for uncertainty in your data. > > Regardless of whether this is the right design, it's still an example of > use. Sure it is. And you may well have earned yourself that beer. But I don't put too much stock in hacks, at least as regards design decisions elsewhere. It's a little dubious when you grant special meaning to things and then use that meaning to justify the things' semantics. I'd much rather find an example where, for instance, numerical calculations might overflow to +inf or -inf, and then further calculations can result in a nan, etc, etc. Those are the sorts of examples that you'd find among SciPy users and such. ChrisA