Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74212
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'subject:: [': 0.04; 'languages,': 0.04; 'subject:Python': 0.06; 'nasty': 0.07; 'referring': 0.07; 'anders': 0.09; 'things,': 0.09; 'valueerror:': 0.09; 'nan': 0.16; 'nans': 0.16; 'subject:Dev': 0.16; 'subject:object': 0.16; 'tradeoffs': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'error': 0.23; 'choices': 0.24; 'math': 0.24; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; '"",': 0.31; '>>>>': 0.31; 'ctypes': 0.31; "d'aprano": 0.31; 'implied': 0.31; 'steven': 0.31; 'file': 0.32; 'skip:c 30': 0.32; '(most': 0.33; 'received:google.com': 0.35; 'false': 0.36; 'e.g.': 0.38; 'skip:[ 10': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'different': 0.65; 'jul': 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=uP+6yi/JWKNc7QVLnYdyA+U+V7z0J7Gupcjicwyz/tQ=; b=cJklq2iKTr3oDqWK3x9fD9I3KDhBivd/7Ti4LKL6xGA7WmN2gFXXBAZLLLadMI0Qe0 DXIM/bFbzzPe/yN4w+D4qs+nLfIyG7k5mS79sWIV4MgJRrRzz6errvzgb/XnKm3Pk18Y UjvKkt1rWD+6HAWtGuh9sT9e5HYLdquHP43K9jp/9ytGP3iNAAYK00tVJUddDgVu/jw2 Y+l4uadtmUHVKwS1EmgQcaVXM+WdFIAuhcQhaRLFa+F6MlS86cyRZ4RR3NuTmrnsoHId 1zsXpnsqnRjoWmnbvgUk853I2QSwbw7d+Z9JAn/COiQKXqjx+k5WRwPb35070vVfr1D6 hpqg== |
| X-Received | by 10.70.131.134 with SMTP id om6mr7322631pdb.95.1404856424654; Tue, 08 Jul 2014 14:53:44 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <53BC5053.1010904@jmunch.dk> |
| References | <53BB2AC7.2060009@gmx.de> <53BB2F25.3020205@gmx.de> <53BB5082.500@btinternet.com> <20140708031202.GF13014@ando> <53BB6D5F.1010800@btinternet.com> <87a98ktjv7.fsf@uwakimon.sk.tsukuba.ac.jp> <CAPTjJmpvyvw81fY899mkuaui2d4u4dXr=2Vtz9z+JusOS=7DkA@mail.gmail.com> <8761j8thf5.fsf@uwakimon.sk.tsukuba.ac.jp> <20140708165745.GJ13014@ando> <53BC5053.1010904@jmunch.dk> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Tue, 8 Jul 2014 15:53:04 -0600 |
| Subject | Re: [Python-Dev] == on object tests identity in 3.x |
| To | Python <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 <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.11663.1404856432.18130.python-list@python.org> (permalink) |
| Lines | 27 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1404856432 news.xs4all.nl 2896 [2001:888:2000:d::a6]:48470 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:74212 |
Show key headers only | View raw
On Tue, Jul 8, 2014 at 2:10 PM, Anders J. Munch <2014@jmunch.dk> wrote:
> Steven D'Aprano wrote:
>> - Keeping reflexivity for NANs would have implied some pretty nasty
>> things, e.g. if log(-3) == log(-5), then -3 == -5.
>
>
>>>> log(-3)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ValueError: math domain error
>
> You were perhaps referring to the log functions in C and Fortran, not
> math.log?
> The tradeoffs are different in those languages, so choices the IEEE-754
> committee made with C and Fortran in mind may be less relevant for Python.
>>> import ctypes
>>> libm = ctypes.cdll.LoadLibrary("libm.so.6")
>>> log = libm.log
>>> log.argtypes = [ctypes.c_double]
>>> log.restype = ctypes.c_double
>>> log(-3)
nan
>>> log(-5)
nan
>>> log(-3) == log(-5)
False
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: [Python-Dev] == on object tests identity in 3.x Ian Kelly <ian.g.kelly@gmail.com> - 2014-07-08 15:53 -0600
csiph-web