From 22b8f2abbd0321153af5ba54ead5f613323820c5 Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Mon, 20 Aug 2007 20:08:59 +0000 Subject: [PATCH] fixed an integer division error (should have been a float division) git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@567813 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/math/util/ResizableDoubleArray.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }