Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #76325
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.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.022 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'correct.': 0.07; 'lawrence': 0.09; '-1,': 0.16; '-1.0': 0.16; 'subject:case': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'aug': 0.22; 'looks': 0.24; 'header :In-Reply-To:1': 0.27; 'url:bugs': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; '>>>>': 0.31; 'url:python': 0.33; 'but': 0.35; 'received:google.com': 0.35; '14,': 0.36; 'url:org': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'negative': 0.60 |
| 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=f9R5EXAcid5492HFxCFv9G6crAlKP56/5joW1uAzgxw=; b=a7SzwIJRjSAzRtNu+445LqtnabVx0spZgwmZMlhd7EfqogZlPEhLKsaiOQmc2UAYpo QPyYpwBTSaef7dDqx0j0uJcBHkAQpq+FcNEaDbgPONf7voSeWocEseXPf3s5C1MGAHZK USfFLvWhpTLS+mwVA4ADKqpSbpwWpa6UEYdcGFvSgMXFmuyOV/UowpYopJyDP/wZ3+B+ agxMubIi5hjZQHADdcbdRKcgVIHz5aqjohpGDXXKNOv8+xaHspBFkwEYRjWsULyEJMzS x/bXJCg30ygay322bfwlRR+fSTtXno+P53pxFnnFBeamn7GQG1uTTrdxtXVUF7OHwij3 yZuw== |
| X-Received | by 10.68.204.134 with SMTP id ky6mr5968953pbc.61.1408038430740; Thu, 14 Aug 2014 10:47:10 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <lsirpk$bq2$2@ger.gmane.org> |
| References | <lsirpk$bq2$2@ger.gmane.org> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Thu, 14 Aug 2014 11:46:30 -0600 |
| Subject | Re: Odd floor-division corner case |
| 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.13006.1408038440.18130.python-list@python.org> (permalink) |
| Lines | 12 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1408038440 news.xs4all.nl 2962 [2001:888:2000:d::a6]:56623 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:76325 |
Show key headers only | View raw
On Thu, Aug 14, 2014 at 11:31 AM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> From http://bugs.python.org/issue22198
>
>>>> -0.5 // float('inf')
> -1.0
Looks like the result is the same for any negative dividend.
> What should it be?
It's surprising, but I think it's correct. A negative infinitesimal
would be less than 0, so its floor should be -1, not 0.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Odd floor-division corner case Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-14 11:46 -0600
csiph-web