Commit Graph

3 Commits

Author SHA1 Message Date
Bruce Allen 44b8232bc4 Typo
svn path=/trunk/boinc/; revision=5979
2005-04-29 19:31:02 +00:00
Bruce Allen f8de417987 Fixed update_average() function to do the right thing when the time
between successive calls is small (zero seconds):

Consider the limit
as diff->0, using the first-order Taylor expansion of
exp(x)=1+x+O(x^2).
So to the lowest order in diff:
weight = 1 - diff ln(2) / half_life
so one has
avg += (1-weight)*(work/diff_days)
avg += [diff*ln(2)/half_life] * (work*SECONDS_PER_DAY/diff)
notice that diff cancels out, leaving
avg += [ln(2)/half_life] * work*SECONDS_PER_DAY

svn path=/trunk/boinc/; revision=5978
2005-04-29 19:22:43 +00:00
David Anderson e8cb263ff7 *** empty log message ***
svn path=/trunk/boinc/; revision=4470
2004-11-01 23:10:02 +00:00