[Avida-SVN] r2590 - development/source/analyze
kaben at myxo.css.msu.edu
kaben at myxo.css.msu.edu
Thu May 22 09:46:41 PDT 2008
Author: kaben
Date: 2008-05-22 12:46:40 -0400 (Thu, 22 May 2008)
New Revision: 2590
Modified:
development/source/analyze/cAnalyzeTreeStats_Gamma.cc
Log:
Repair integer overflow in Gabe's gamma statistic computation.
Modified: development/source/analyze/cAnalyzeTreeStats_Gamma.cc
===================================================================
--- development/source/analyze/cAnalyzeTreeStats_Gamma.cc 2008-05-21 19:11:02 UTC (rev 2589)
+++ development/source/analyze/cAnalyzeTreeStats_Gamma.cc 2008-05-22 16:46:40 UTC (rev 2590)
@@ -98,14 +98,14 @@
return;
}
- int T = 0;
+ long T = 0;
for(int j = 2; j <= n; j++) { T += j*m_g[j]; }
// so: exterior summation
- int so = 0;
+ long so = 0;
for(int i = 2; i <= n-1; i++) {
// si: interior summation
- int si = 0;
+ long si = 1;
for(int k = 2; k <= i; k++) { si += k*m_g[k]; }
so += si;
}
More information about the Avida-cvs
mailing list