Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Optimizing Memory Allocation in a Simple, but Long Function Date: Mon, 25 Apr 2016 19:39:49 +1200 Lines: 10 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net VE+k42g84AKYT05M7Its5gKAvfCWKJaVvSB+DwYML+xbruTNZg Cancel-Lock: sha1:RwvlN63mwCtl/eKRnr8Wnv+SnRo= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:107586 Derek Klinge wrote: > Also, it seems to me if the goal is to use the smallest value of n to get a > particular level of accuracy, changing your guess of N by doubling seems to > have a high chance of overshoot. If you want to find the exact n required, once you overshoot you could use a binary search to narrow it down. -- Greg