Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93434
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.008 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:skip:m 10': 0.09; 'unexpected': 0.09; 'python': 0.11; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'uname': 0.16; 'tue': 0.18; '>>>': 0.20; '"",': 0.22; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'linux': 0.26; 'cest': 0.29; 'file': 0.34; 'to:addr:python- list': 0.35; 'subject:: ': 0.37; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'more': 0.62; 'mar': 0.65; 'received:109': 0.75; 'becker': 0.84; 'smp': 0.84 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Robin Becker <robin@reportlab.com> |
| Subject | Re: Bug in floating point multiplication |
| Date | Thu, 02 Jul 2015 16:29:40 +0100 |
| References | <55955048$0$1662$c3e8da3$5496439d@news.astraweb.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | 109.174.168.73 |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
| In-Reply-To | <55955048$0$1662$c3e8da3$5496439d@news.astraweb.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| 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.251.1435850983.3674.python-list@python.org> (permalink) |
| Lines | 46 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1435850983 news.xs4all.nl 2947 [2001:888:2000:d::a6]:52798 |
| X-Complaints-To | abuse@xs4all.nl |
| X-Received-Bytes | 3446 |
| X-Received-Body-CRC | 680522902 |
| Xref | csiph.com comp.lang.python:93434 |
Show key headers only | View raw
$ uname -a
Linux everest 4.0.6-1-ARCH #1 SMP PREEMPT Tue Jun 23 14:40:31 CEST 2015 i686
GNU/Linux
robin@everest:~
$ python2
Python 2.7.10 (default, May 26 2015, 04:28:58)
[GCC 5.1.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 1.0 - 1.0/2**53
>>> assert x == 0.9999999999999999
>>> for i in range(1, 1000000):
... if int(i*x) == i:
... print(i); break
...
2049
>>>
robin@everest:~
$ python
Python 3.4.3 (default, Mar 26 2015, 07:36:01)
[GCC 4.9.2 20150304 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt
>>> x = 1 - 1/2**53
>>> assert x == 0.9999999999999999
>>> for i in range(1, 1000000):
File "<stdin>", line 1
for i in range(1, 1000000):
^
IndentationError: unexpected indent
>>> for i in range(1, 1000000):
... if int(i*x) == i:
... print(i); break
...
2049
>>>
robin@everest:~/devel/filps
--
Robin Becker
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug in floating point multiplication Steven D'Aprano <steve@pearwood.info> - 2015-07-03 00:52 +1000
Re: Bug in floating point multiplication Michael Poeltl <michael.poeltl@univie.ac.at> - 2015-07-02 17:10 +0200
Re: Bug in floating point multiplication Chris Angelico <rosuav@gmail.com> - 2015-07-03 01:21 +1000
Re: Bug in floating point multiplication Robin Becker <robin@reportlab.com> - 2015-07-02 16:24 +0100
Re: Bug in floating point multiplication Paul Rubin <no.email@nospam.invalid> - 2015-07-02 08:26 -0700
Re: Bug in floating point multiplication Chris Angelico <rosuav@gmail.com> - 2015-07-03 01:34 +1000
Re: Bug in floating point multiplication Steven D'Aprano <steve@pearwood.info> - 2015-07-03 01:41 +1000
Re: Bug in floating point multiplication Ian Kelly <ian.g.kelly@gmail.com> - 2015-07-02 09:38 -0600
Re: Bug in floating point multiplication Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2015-07-02 17:15 +0200
Re: Bug in floating point multiplication Ian Kelly <ian.g.kelly@gmail.com> - 2015-07-02 09:28 -0600
Re: Bug in floating point multiplication Robin Becker <robin@reportlab.com> - 2015-07-02 16:29 +0100
Re: Bug in floating point multiplication Ian Kelly <ian.g.kelly@gmail.com> - 2015-07-02 09:32 -0600
Re: Bug in floating point multiplication Steven D'Aprano <steve@pearwood.info> - 2015-07-03 01:42 +1000
Re: Bug in floating point multiplication duncan smith <buzzard@invalid.invalid> - 2015-07-02 17:08 +0100
Re: Bug in floating point multiplication MRAB <python@mrabarnett.plus.com> - 2015-07-02 17:20 +0100
Re: Bug in floating point multiplication Tim Chase <python.list@tim.thechases.com> - 2015-07-02 11:59 -0500
Re: Bug in floating point multiplication Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-07-02 19:49 +0200
Re: Bug in floating point multiplication Ned Deily <nad@acm.org> - 2015-07-02 22:07 -0700
Re: Bug in floating point multiplication Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-07-03 18:27 +0200
Re: Bug in floating point multiplication Laurent Pointal <laurent.pointal@free.fr> - 2015-07-02 23:12 +0200
Re: Bug in floating point multiplication Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-07-03 16:13 +0100
Re: Bug in floating point multiplication Laura Creighton <lac@openend.se> - 2015-07-05 00:54 +0200
Re: Bug in floating point multiplication Peter Otten <__peter__@web.de> - 2015-07-05 09:38 +0200
csiph-web