BigInteger.bitLength() should state explicitly that 0 will be returned when the BigInteger's value is zero. This is already specified by the pseudo-code in the method documentation, but not verbally as is done for example for the analogous method java.util.BitSet.length(). Equivalent methods are thus explicitly specified in other programming languages.
- csr for
-
JDK-8199280 BigInteger.bitLength() should explicitly specify behavior when the value is zero
-
- Closed
-
- relates to
-
JDK-8198934 BigInteger.valueOf(0L).bitLength() is 0 instead of 1
-
- Closed
-
- links to