commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r567813 - /commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java
Date Mon, 20 Aug 2007 20:09:01 GMT
Author: luc
Date: Mon Aug 20 13:08:59 2007
New Revision: 567813

URL: http://svn.apache.org/viewvc?rev=567813&view=rev
Log:
fixed an integer division error (should have been a float division)

Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java?rev=567813&r1=567812&r2=567813&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java
Mon Aug 20 13:08:59 2007
@@ -667,7 +667,7 @@
      */
     private synchronized boolean shouldContract() {
         if (expansionMode == MULTIPLICATIVE_MODE) { 
-            return (internalArray.length / numElements) > contractionCriteria;
+            return (internalArray.length / ((float) numElements)) > contractionCriteria;
         } else {
             return (internalArray.length - numElements) > contractionCriteria;
         }



Mime
View raw message