Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'mrab': 0.05; 'root': 0.05; 'subject:Question': 0.07; 'reached.': 0.09; 'subject:number': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'root:': 0.16; 'wrote:': 0.18; 'aug': 0.22; 'integer': 0.24; 'header:In-Reply-To:1': 0.27; 'needed.': 0.30; 'message- id:@mail.gmail.com': 0.30; '13,': 0.31; 'actual': 0.34; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'needed': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'square': 0.74; '2013': 0.98 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:to :content-type; bh=sz0NsEcZ7SLafp9NN0XCgFjReOd81ZE5buVRUW7lFKQ=; b=YA+JL8W2MIGSPFlwvmGxHbJ0svN0VquOzemAunW12SHvdyn8kih+YQtjz12LfyQ26N 1cJNgRk0IdfVZHlQ0jm5Wq1daNbnK93nCaxA3pO7SrqVbNxW0zlYzPyKsa5tBAwrH+0w SWSwhBpd8q9i0HK23zzGjoablVOtbS1Y4gpGmGoT013ILVnAR5QffiZpRoojwwPtxs+Y axGbHk5uM2gU4YBvHIBd2LWBDZMoKtckxQaq3juntmdNNoRZXroUHwqmKt+YHW40TmjF aaSTb41EM7srs0Gi7Wppqxjk+LQagEDMiGhGM4CyTXcU9mAraZh1Rs6hF/5tfw+CSuLC zFCw== MIME-Version: 1.0 X-Received: by 10.52.35.40 with SMTP id e8mr1576492vdj.37.1376413300009; Tue, 13 Aug 2013 10:01:40 -0700 (PDT) In-Reply-To: <520A51E2.8020908@mrabarnett.plus.com> References: <520A2295.5040605@gmail.com> <520A51E2.8020908@mrabarnett.plus.com> Date: Tue, 13 Aug 2013 18:01:39 +0100 Subject: Re: Question about function failing with large number From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 7 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1376413309 news.xs4all.nl 15900 [2001:888:2000:d::a6]:36683 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52467 On Tue, Aug 13, 2013 at 4:33 PM, MRAB wrote: > Here's a way to calculate the integer square root: Yes, but the actual value of the square root isn't needed. All that's needed is to stop the loop once the sqrt is reached. ChrisA