diff --git a/src/java/org/apache/commons/math/util/ResizableDoubleArray.java b/src/java/org/apache/commons/math/util/ResizableDoubleArray.java index 5edcf0ec5..5fc4a542d 100644 --- a/src/java/org/apache/commons/math/util/ResizableDoubleArray.java +++ b/src/java/org/apache/commons/math/util/ResizableDoubleArray.java @@ -667,7 +667,7 @@ public class ResizableDoubleArray implements DoubleArray, Serializable { */ 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; }