bisection method: Simulating a retirement fund

Carl Banks pavlovevidence at gmail.com
Fri Sep 3 14:28:07 EDT 2010


On Sep 2, 1:37 pm, Baba <raoul... at gmail.com> wrote:
> level: beginner

In this economy, simulating the value of retirement funds with
bisection is easy. Look:
def retirement_fund_value(n_years,initial_value):
 for i in xrange(n_years):
 value /= 2 # <- bisect value of fund
 return value
Carl Banks


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /