Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4.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.042 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'suddenly': 0.07; 'back.': 0.09; 'subject:set': 0.09; 'worked.': 0.09; 'cc:addr:python-list': 0.11; '10:05': 0.16; 'digits.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'infinitely': 0.16; 'perfect.': 0.16; 'wrote:': 0.18; 'work,': 0.20; 'saying': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'constant': 0.31; 'large.': 0.31; 'produces': 0.31; 'subject:numbers': 0.31; 'yes.': 0.31; 'subject:the': 0.34; 'subject:with': 0.35; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'two': 0.37; 'skip:. 20': 0.38; 'pm,': 0.38; 'anything': 0.39; 'expect': 0.39; 'skip:. 10': 0.39; 'major': 0.40; 'even': 0.60; 'tell': 0.60; 'sum': 0.64; 'between': 0.67; 'mar': 0.68; 'grow': 0.77; 'amazed': 0.84; 'technically': 0.84; 'carries': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=/ajZMAhaSwhHAP41cUmpL/zD0oBhliELudnwqS2OdQs=; b=I0mNlxqVs+zpSrbmLgtOd4oyp/DSp4qtPkZeBsc4q1xY4pPKbGnONR6afQLRQt2twt WUT53cjlmLhM3rgSPDB/ra5cSaeN3g0VjhZxTKqqQF70o37NLqfR+yp4FOqA5KyTTjqF 0L9emj0pSHwQvq/yF2j8qf39d0L+qD7Gu4LgMEjpCHtECAx/kQuP7VauGyCr2abIE2t4 2LfaDhUCtIZtBGwVveORbHOGhTYUe6aj6GR5abwWtKia6DMZjtZuyH9B7veb4BjO3lWx VFNappuFeOnCv3X7H2qiBRxNSbiiopWUiar6Vb4BO4f5Tsk+4KYDSKgsbVegY+RGKgbl Dcvg== MIME-Version: 1.0 X-Received: by 10.68.197.36 with SMTP id ir4mr25970339pbc.46.1393937033558; Tue, 04 Mar 2014 04:43:53 -0800 (PST) In-Reply-To: References: <8e4c1ab1-e65d-483f-ad9d-6933ae2052c3@googlegroups.com> <85r478bv99.fsf_-_@benfinney.id.au> <53153e66$0$24931$e4fe514c@dreader36.news.xs4all.nl> <59dd57ad-39b0-4c71-a58e-b4ae6517b385@googlegroups.com> <53156a42$0$2923$c3e8da3$76491128@news.astraweb.com> Date: Tue, 4 Mar 2014 23:43:53 +1100 Subject: Re: Working with the set of real numbers From: Chris Angelico Cc: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393937036 news.xs4all.nl 2856 [2001:888:2000:d::a6]:59692 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67667 On Tue, Mar 4, 2014 at 10:05 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> In constant space, that will produce the sum of two infinite sequences >> of digits. > > > It's not constant space, because the nines counter > can grow infinitely large. Okay, okay, technically yes. But the counter can go a long way up before it takes up any additional space, so all that's really saying is that this has a major flaw with anything that produces a long stream of nines. It can't tell the difference between .99999999999999998 and .999999999999999999999999[11] where the 11 suddenly carries and it has to flip it all back. Anyway, that was like ten minutes' knocking-together work, you can't expect it to be perfect. I'm amazed it even worked. :) ChrisA