Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed1.swip.net!uio.no!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.056 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'subject:Why': 0.09; 'python': 0.11; 'backward': 0.16; 'nan': 0.16; 'underlying': 0.16; 'wrote:': 0.18; 'module': 0.19; "python's": 0.19; 'thu,': 0.19; 'math': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'sep': 0.31; 'quite': 0.32; '(e.g.': 0.33; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'done': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'simply': 0.61; 'more': 0.64; 'due': 0.66; 'default': 0.69; 'gotten': 0.74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=JeqKPpyH35VTe0ZrAvAPhnii0pKkINPd1WtOPfXvuWY=; b=ByqPIVKGNC989d2xgQV7o+O10d0LcqMZ0trU67bn3OAu2BIPwmJGEPBWr5u2J9/0Jr 0pZbrjXGS6WBgDGpiFWJf1LBS0WDIPPZ1opR4ivuBdsQtJk1RkqzmFq2YlwjKp0gPuCK 2g04G6xiY7075jEb4KeCsRdXGj9uyjvdnwV8/aigp1Wo+XCO4RlMQc7gD5kiiYe601ZV LKgy1uOtAWku6l4wFUTlyno+2oWDgklnKrxzLacN7NWo6DvISyOdj6A4O109otI8mPaL dQ+QmC+21D5ymsHSt6CSnbvGnUxbFD7w5PevLYvkAD0O80q9A7TdyfDLtoRPHQWkXvDe 8E4Q== X-Received: by 10.66.119.103 with SMTP id kt7mr7541051pab.95.1411059940453; Thu, 18 Sep 2014 10:05:40 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1f3b8ce6-614a-4b99-9660-a6ef35eda75f@googlegroups.com> References: <06397cb3-8baf-4af1-8152-ff7c3f6ceb62@googlegroups.com> <1f3b8ce6-614a-4b99-9660-a6ef35eda75f@googlegroups.com> From: Ian Kelly Date: Thu, 18 Sep 2014 11:05:00 -0600 Subject: Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` To: Python 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: 6 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1411060010 news.xs4all.nl 2886 [2001:888:2000:d::a6]:45285 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78028 On Thu, Sep 18, 2014 at 10:35 AM, wrote: > It's be nice if Python's math module did more than simply wrap the default i implementation of the underlying C lib -- it's gotten better over the years (Inf and NaN used to be really hard to get), but still not quite what it could be. I think there's not a whole lot that can be done due to backward compatibility issues. Python 3 did make some progress (e.g. math.floor now returns an int instead of a float).