Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; '~ethan~': 0.09; 'binary': 0.13; 'hex': 0.16; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'cc:no real name:2**0': 0.21; 'trying': 0.21; "doesn't": 0.22; 'header:In- Reply-To:1': 0.22; 'cc:2**0': 0.26; 'subject: .': 0.29; 'cc:addr:python.org': 0.29; 'finite': 0.30; "didn't": 0.30; 'quite': 0.31; 'michael': 0.31; 'thanks': 0.32; 'there': 0.33; 'header:User-Agent:1': 0.33; 'showing': 0.34; 'numbers.': 0.34; 'things': 0.35; "he's": 0.37; 'sequence': 0.37; 'doing': 0.38; 'should': 0.38; 'clearly': 0.39; 'that.': 0.39; 'point': 0.40; 'back': 0.60; 'simple': 0.61; 'received:websitewelcome.com': 0.64; 'received:69.93': 0.67 Date: Tue, 28 Feb 2012 09:56:34 -0800 From: Ethan Furman User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Michael Torrie Subject: Re: Python math is off by .000000000000045 References: <4f4965f5$0$29989$c3e8da3$5496439d@news.astraweb.com> <4F4BBD4C.1050603@stoneleaf.us> <4F4C2595.6030207@gmail.com> In-Reply-To: <4F4C2595.6030207@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: mail.admailinc.com ([192.168.10.136]) [72.11.125.166]:3303 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 2 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1330455205 news.xs4all.nl 6933 [2001:888:2000:d::a6]:51560 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20999 Michael Torrie wrote: > He's simply showing you the hex (binary) representation of the > floating-point number's binary representation. As you can clearly see > in the case of 1.1, there is no finite sequence that can store that. > You end up with repeating numbers. Thanks for the explanation. > This should help you understand why you get errors > doing simple things like x/y*y doesn't quite get you back to x. I already understood that. I just didn't understand what point he was trying to make since he gave no explanation. ~Ethan~