String a = "-37361671119238118911893939591735";
int aScale = 10;
String b = "74723342238476237823787879183470";
int bScale = -15;
int newScale = 31;
RoundingMode rm = RoundingMode.UP;
String c = "-5.00000E-26";
BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale);
BigDecimal bNumber = new BigDecimal(new BigInteger(b), bScale);
BigDecimal result = aNumber.divide(bNumber, newScale, rm);
assertEquals("incorrect value", c, result.toString());