question: public void testToBigIntegerZero ( ) { String a = "-123809648392384754573567356745735.63567890295784902768787678287E-500" ; BigInteger bNumber = new BigInteger ( "0" ) ; BigDecimal aNumber = new BigDecimal ( a ) ; BigInteger result = aNumber . toBigInteger ( ) ; assertTrue ( "incorrect value" , result . equals ( bNumber ) ) ; }
target:  Convert a small BigDecimal to BigInteger