+2005-06-28 Robin Green <greenrd@greenrd.org>
+
+ PR java/22189
+ * gnu/gcj/runtime/PersistentByteMap.java (init): Fix rounding
+ error.
+
2005-06-27 Tom Tromey <tromey@redhat.com>
PR java/21540, PR java/13788:
// We're going to make that size prime. This isn't
// strictly necessary but it can't hurt.
//
- // We expand the size by 3/2 because the hash table is
- // intolerably slow when more than 2/3 full.
+ // We expand the size by 3/2 and round the result because the
+ // hash table is intolerably slow when more than 2/3 full.
- BigInteger size = new BigInteger(Integer.toString(capacity * 3/2));
+ BigInteger size = new BigInteger(Integer.toString(((capacity*3)+1)/2));
BigInteger two = BigInteger.ONE.add(BigInteger.ONE);
if (size.getLowestSetBit() != 0) // A hard way to say isEven()