Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73603
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.005 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'binary': 0.07; 'float': 0.07; 'subject:bug': 0.07; '*is*': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'type,': 0.09; '*a*': 0.16; 'binary,': 0.16; 'clockwork': 0.16; 'finite': 0.16; 'finney': 0.16; 'notation.': 0.16; 'operates': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'surprises': 0.16; 'subject:python': 0.16; 'applies': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'all,': 0.19; 'header:User-Agent:1': 0.23; 'supported': 0.26; 'values': 0.27; 'header:X-Complaints-To:1': 0.27; 'point': 0.28; 'points': 0.29; '-0700,': 0.31; 'commonly': 0.31; "d'aprano": 0.31; 'decimal': 0.31; 'raised': 0.31; 'steven': 0.31; 'writes:': 0.31; 'languages': 0.32; 'limitation': 0.33; "i'd": 0.34; 'point.': 0.35; 'but': 0.35; 'useful': 0.36; 'subject:?': 0.36; 'throughout': 0.37; 'represent': 0.38; 'ben': 0.38; 'saves': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'received:org': 0.40; 'referred': 0.60; 'save': 0.62; 'such': 0.63; 'refer': 0.63; 'different': 0.65; 'skip:\xe2 10': 0.65; '8bit%:40': 0.68; 'subject': 0.69; 'cpu.': 0.84; 'inherent': 0.84; 'received:125': 0.84; 'hong': 0.91; 'kong': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Ben Finney <ben@benfinney.id.au> |
| Subject | Re: python 3.44 float addition bug? |
| Date | Thu, 26 Jun 2014 13:39:23 +1000 |
| References | <XnsA35313E634BA0fraserlonggmailcom34@216.196.109.145> <645be4a7-2e1b-44a4-9c45-9184c6df5518@googlegroups.com> <53ab8bc4$0$11121$c3e8da3@news.astraweb.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| X-Gmane-NNTP-Posting-Host | jigong.madmonks.org |
| X-Public-Key-ID | 0xAC128405 |
| X-Public-Key-Fingerprint | 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 |
| X-Public-Key-URL | http://www.benfinney.id.au/contact/bfinney-pubkey.asc |
| X-Post-From | Ben Finney <bignose+hates-spam@benfinney.id.au> |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
| Cancel-Lock | sha1:O493cijO2QP8dOA8mZ+twJ66PHA= |
| 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.11251.1403753977.18130.python-list@python.org> (permalink) |
| Lines | 34 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1403753978 news.xs4all.nl 2857 [2001:888:2000:d::a6]:47174 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:73603 |
Show key headers only | View raw
Steven D'Aprano <steve@pearwood.info> writes: > On Wed, 25 Jun 2014 14:12:31 -0700, Maciej Dziardziel wrote: > > > Floating points values use finite amount of memory, and cannot > > accurately represent infinite amount of numbers, they are only > > approximations. This is limitation of float type and applies to any > > languages that uses types supported directly by cpu. To deal with it > > you can either use decimal.Decimal type that operates using decimal > > system and saves you from such surprises > > That's a myth. decimal.Decimal *is* a floating point value That's misleading: Decimal uses *a* floating-point representation, but not the one commonly referred to. That is, Decimal does not use IEEE-754 floating point. > and is subject to *exactly* the same surprises as binary floats, Since those “surprises” are the ones inherent to *decimal*, not binary, floating point, I'd say it's also misleading to refer to them as “exactly the same surprises”. They're barely surprises at all, to someone raised on decimal notation. This makes the Decimal functionality starkly different from the built-in ‘float’ type, and it *does* save you from the rather-more-surprising behaviour of the ‘float’ type. This is not mythical. -- \ “Guaranteed to work throughout its useful life.” —packaging for | `\ clockwork toy, Hong Kong | _o__) | Ben Finney
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
python 3.44 float addition bug? FraserL <fraser.long+usenet@NOSPAMgmail.com> - 2014-06-20 19:57 -0500
Re: python 3.44 float addition bug? FraserL <fraser.long+usenet@gmail.com> - 2014-06-20 20:11 -0500
Re: python 3.44 float addition bug? Gary Herron <gary.herron@islandtraining.com> - 2014-06-20 18:19 -0700
Re: python 3.44 float addition bug? Gary Herron <gary.herron@islandtraining.com> - 2014-06-20 18:07 -0700
Re: python 3.44 float addition bug? Chris Angelico <rosuav@gmail.com> - 2014-06-21 11:33 +1000
Re: python 3.44 float addition bug? INADA Naoki <songofacandy@gmail.com> - 2014-06-21 10:06 +0900
Re: python 3.44 float addition bug? Grant Edwards <invalid@invalid.invalid> - 2014-06-21 14:25 +0000
Re: python 3.44 float addition bug? Ned Deily <nad@acm.org> - 2014-06-21 12:24 -0700
Re: python 3.44 float addition bug? buck <workitharder@gmail.com> - 2014-06-23 17:55 -0700
Re: python 3.44 float addition bug? Chris Angelico <rosuav@gmail.com> - 2014-06-24 13:26 +1000
Re: python 3.44 float addition bug? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-06-24 17:30 +1200
Re: python 3.44 float addition bug? Steven D'Aprano <steve@pearwood.info> - 2014-06-24 06:34 +0000
Re: python 3.44 float addition bug? Maciej Dziardziel <fiedzia@gmail.com> - 2014-06-25 14:12 -0700
Re: python 3.44 float addition bug? Steven D'Aprano <steve@pearwood.info> - 2014-06-26 02:56 +0000
Re: python 3.44 float addition bug? Chris Angelico <rosuav@gmail.com> - 2014-06-26 13:13 +1000
Re: python 3.44 float addition bug? Steven D'Aprano <steve@pearwood.info> - 2014-06-26 04:17 +0000
Re: python 3.44 float addition bug? Chris Angelico <rosuav@gmail.com> - 2014-06-26 14:41 +1000
Re: python 3.44 float addition bug? Ben Finney <ben@benfinney.id.au> - 2014-06-26 13:39 +1000
Re: python 3.44 float addition bug? Steven D'Aprano <steve@pearwood.info> - 2014-06-26 09:15 +0000
Re: python 3.44 float addition bug? Chris Angelico <rosuav@gmail.com> - 2014-06-26 19:38 +1000
Re: python 3.44 float addition bug? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-27 02:51 +0000
Re: python 3.44 float addition bug? Chris Angelico <rosuav@gmail.com> - 2014-06-27 13:24 +1000
Re: python 3.44 float addition bug? Ian Kelly <ian.g.kelly@gmail.com> - 2014-06-27 10:18 -0600
Re: python 3.44 float addition bug? Stefan Behnel <stefan_ml@behnel.de> - 2014-06-26 07:53 +0200
csiph-web