Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!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.042 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'python.': 0.02; 'float': 0.07; 'utf-8': 0.07; 'cc:addr:python-list': 0.11; '754': 0.16; 'exception?': 0.16; 'nan': 0.16; 'nans,': 0.16; 'subject:exception': 0.16; 'wrote:': 0.18; '(not': 0.18; 'thu,': 0.19; '>>>': 0.22; 'cc:addr:gmail.com': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:python': 0.33; 'sense': 0.34; 'received:google.com': 0.35; 'there': 0.35; 'raising': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'url:library': 0.38; 'pm,': 0.38; 'subject:can': 0.39; 'from:charset:utf-8': 0.61; 'information': 0.63; 'more': 0.64; 'skip:\xe2 10': 0.65; 'to:addr:gmail.com': 0.65; 'subject:. ': 0.67; '8bit%:43': 0.74; 'behavior': 0.77; 'subject:get': 0.81; 'standards.': 0.84; 'joel': 0.91; 'url:tk': 0.95 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 :cc:content-type:content-transfer-encoding; bh=EIyBOD2EHo8Eu2jR5VYGc+uILTG9V8qV9uw/XIqeqKE=; b=hMlgyEG+t9KgFoAR1H/VzSRnwuCXitYAC792IDmNPUn40qXqPc0HqUuFQB6OJ3yIuh G96+2EUf6LiLZ44EaOcqfPXv8jYkIydSyTHazEI5I2G2mmV90sWQcnbMJnoCCtDFs90C I8ej0YItXnTyUxDCgscSCIGRPF/lwzZxJ6Q9qZyo5roaZcmG+QETco4XKwZzcbZOSiEn 2Vd6YJlV4GMJZ6fE/kwhL5S3sXDdSehz8R7u6xiI2rkaQiHiLUeiGl+YNBv7uBljAgV7 E9Uz2wxPqDSQym1xrnqxZpTRGrsFLpQvHYJXDEiMTLkaeJ+X7Iw5KOzCzvQiNC8YAMRw o1OQ== MIME-Version: 1.0 X-Received: by 10.50.124.4 with SMTP id me4mr6962678igb.39.1403178637554; Thu, 19 Jun 2014 04:50:37 -0700 (PDT) In-Reply-To: References: Date: Thu, 19 Jun 2014 13:50:37 +0200 Subject: Re: can I get 0./0. to return nan instead of exception? From: =?UTF-8?B?Q2hyaXMg4oCcS3dwb2xza2HigJ0gV2Fycmljaw==?= To: Joel Goldstick Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Neal Becker , 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1403178645 news.xs4all.nl 2946 [2001:888:2000:d::a6]:55531 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73415 On Thu, Jun 19, 2014 at 1:31 PM, Joel Goldstick wrote: > > On Jun 19, 2014 7:05 AM, "Neal Becker" wrote: >> >> Can I change behavior of py3 to return nan for 0./0. instead of raising = an >> exception? > > There is no nan in python. Wrong: >>> float('nan') nan >>> also: https://docs.python.org/2/library/math.html#math.isnan > Check if the float x is a NaN (not a number). For more information on NaN= s, see the IEEE 754 standards. --=20 Chris =E2=80=9CKwpolska=E2=80=9D Warrick PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense