Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!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; '(especially': 0.07; '(given': 0.09; 'precision': 0.09; 'pm,': 0.11; 'subject:error': 0.12; 'wrote:': 0.14; 'subject:was': 0.16; 'tue,': 0.20; 'header :In-Reply-To:1': 0.22; 'received:209.85.214.174': 0.23; 'received :mail-iw0-f174.google.com': 0.23; 'version': 0.25; 'pointed': 0.25; "i'm": 0.26; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'nobody': 0.29; 'finite': 0.31; 'to:addr:python-list': 0.32; 'generally': 0.33; 'that,': 0.35; 'accurate': 0.35; 'surprised': 0.35; 'usually': 0.36; 'rather': 0.36; 'getting': 0.36; 'case': 0.37; 'received:209.85': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.39; 'subject: (': 0.39; 'received:209': 0.39; 'header:Received:5': 0.40; 'performance.': 0.60; 'hand': 0.61; '2011': 0.62; 'traditional': 0.65; 'floats.': 0.84; 'hand.': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=0PkxyChSDq11G0M1StdTrhr3HS0tp+Lvb1MsZkrd6jI=; b=K/rVzhBvYXsYcTg6i0T5hjL8P14ox53s6gfaubRWP7I4r6LhIPwYSCIetNrYjnXORF /envk/jywvskB0Ke3/a8IDaJ1/orxlTMP2aJzgcCGdNhKltxZsFxh8hbxz+k2P/74G/B bD577slZTH909NVN+PAAqDuMI9tkwyGZby4SA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Q6PN1iWi2/kBc3yNM0koQsV4Ob0eRQNOBMzcKa9F7Nuugegf9L1109oMstzUsxc2k5 ojRP82wt2+SSZhFKRnXotI/USl2PMMv0Aq4A97fpH4gd+WauscBhG0rpoQRTR+EYrtHC Eb1YUXOKsz1TlPIfUVczyuyfYnPhseE4Dw0aI= MIME-Version: 1.0 In-Reply-To: <4DBFD9A6.1040803@ieee.org> References: <0HFvp.18698$vT3.2042@newsfe06.iad> <6828b506-1e18-4bfa-85c0-caa830daf98a@j13g2000pro.googlegroups.com> <4DBFD9A6.1040803@ieee.org> Date: Tue, 3 May 2011 21:04:07 +1000 Subject: Re: Recursion or iteration (was Fibonacci series recursion error) 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.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: 11 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1304420652 news.xs4all.nl 41114 [::ffff:82.94.164.166]:33180 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4537 On Tue, May 3, 2011 at 8:32 PM, Dave Angel wrote: > What I'm surprised at is that nobody has pointed out that the logn version > is also generally more accurate, given traditional floats. Usually getting > the answer accurate (given the constraints of finite precision > intermediates) is more important than performance, but in this case they go > hand in hand. And that, Your Honour, is why I prefer bignums (especially for integers) to floating point. Precision rather than performance. Chris Angelico