kill(all)$

fpprintprec:5$

[L_Van_Warren, timedate()];

      In the  course, "Information, Computing and the Future",
      Dr. Daniel Berleant asks us to:
      "Estimate the doubling time of the software development productivity
       of the average programmer, if productivity increases at 6%/year."

      Using the symbol r for the rate of productivity we write:

              the productivity at year 0 = n
              the productivity at year 1 = n*(1+r)
              the productivity at year 2 = n*(1+r)(1+r)
              the productivity at year y = n*(1+r)^y

productivity(n, r, y) := n*(1+r)^y$

       We need the year that productivity reaches 2n,
       so we solve the function for the year.

solution:solve(productivity(n, r, y)=2*n, y)$ solution;

Y(r) := float(''(rhs(first(solution))))$

      Using the date functions we wrote last time:

year(y):=floor(y)$
month(y):=floor((y-year(y))*12)$
day(m):=floor((m-floor(m))*365.25/12)$
date(d):=['year=year(d), 'month=month(d), 'day=day(d)]$

date(Y(0.06));

      Therefore programmer productivity doubles every
      11 years, 10 months and 27 days if productivity
      increases by 6% per year.