On 6 February 2012 21:15, Roger Riggs <roger.ri...@oracle.com> wrote: >> Separately but related, there are missing methods in BigInteger, >> longValueExact() and intValueExact() > > BigInteger provides a bitLength method than be tested to see if the result > would overflow. That's a better API than an ArithmeticException and is > easier for the developer to work with.
As a user, I wouldn't think to use bitLength, and the readability of the resulting code would be far lower. With BigDecimal, int and long now having these "exact" methods, not providing the equivalent on BigInteger should be raising some red flags. Stephen