question: public void testMultiplyDiffScaleNegPos ( ) { String a = "1231212478987482988429808779810457634781384756794987" ; int aScale = - 15 ; String b = "747233429293018787918347987234564568" ; int bScale = 10 ; String c = "9.20003122862175749786430095741145455670101391569026662845893091880727173060570190220616E+91" ; int cScale = - 5 ; BigDecimal aNumber = new BigDecimal ( new BigInteger ( a ) , aScale ) ; BigDecimal bNumber = new BigDecimal ( new BigInteger ( b ) , bScale ) ; BigDecimal result = aNumber . multiply ( bNumber ) ; assertEquals ( "incorrect value" , c , result . toString ( ) ) ; assertEquals ( "incorrect scale" , cScale , result . scale ( ) ) ; }
target:  Multiply two numbers of different scales