Optimizing Memory Allocation in a Simple, but Long Function

Gregory Ewing greg.ewing at canterbury.ac.nz
Mon Apr 25 03:39:49 EDT 2016


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



More information about the Python-list mailing list