question: public void testToBigIntegerPos2 ( ) { String a = "123809648392384754573567356745735.63567890295784902768787678287E+15" ; BigInteger bNumber = new BigInteger ( "123809648392384754573567356745735635678902957849" ) ; BigDecimal aNumber = new BigDecimal ( a ) ; BigInteger result = aNumber . toBigInteger ( ) ; assertTrue ( "incorrect value" , result . equals ( bNumber ) ) ; }
target:  Convert a positive BigDecimal to BigInteger