Fix problem with willOverflow method
Fix problem with willOverflow method

The new approach is simpler and also more accurate. The old approach had
problems around edge cases. It assumed that:

  numBits(result) = numBits(a) + numBits(b)

But this is not always true. For example:

  2^4 * 2^4 = 2^8           <=>  16 [5] * 16 [5] = 256 [9]
  2^4+1 * 2^4-1 = 2^8 - 1   <=>  17 [5] * 15 [4] = 255 [8]
  2^4-1 * 2^5-1 = 2^9 - 47  <=>  15 [4] * 31 [5] = 465 [9]

So it seems the integer arithmetic involved is non-trivial.

Fortunately, we can use a simpler division test instead.

scifio/scifio