commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdigg...@apache.org
Subject cvs commit: jakarta-commons-sandbox/math/src/java/org/apache/commons/math/stat UnivariateImpl.java
Date Mon, 16 Jun 2003 21:38:15 GMT
mdiggory    2003/06/16 14:38:15

  Modified:    math/src/java/org/apache/commons/math/stat
                        UnivariateImpl.java
  Log:
  I'm not sure with this algorithm, but I'm going to add this test back into the Variance
that protects it from returning a value less than 0.
  
  Revision  Changes    Path
  1.8       +2 -2      jakarta-commons-sandbox/math/src/java/org/apache/commons/math/stat/UnivariateImpl.java
  
  Index: UnivariateImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/math/src/java/org/apache/commons/math/stat/UnivariateImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- UnivariateImpl.java	16 Jun 2003 21:24:30 -0000	1.7
  +++ UnivariateImpl.java	16 Jun 2003 21:38:15 -0000	1.8
  @@ -185,7 +185,7 @@
   			return super.getVariance();
   		}
   
  -		return variance;
  +		return variance < 0 ? 0.0 : variance;
   	}
   
   	/**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message