private void verifyHighPrecisionSubtractSingle() {

    Decimal128 a, b, r;
    String sA, sB;

    a = new Decimal128();
    sA = makeNumericString(37);
    a.update(sA, (short) 0);
    b = new Decimal128();
    sB = makeNumericString(37);
    b.update(sB, (short) 0);

    r = new Decimal128();
    r.addDestructive(a, (short) 0);
    r.subtractDestructive(b, (short) 0);

    String res1 = r.toFormalString();

    // Now do the add with Java BigDecimal
    BigDecimal bdA = new BigDecimal(sA);
    BigDecimal bdB = new BigDecimal(sB);
    BigDecimal bdR = bdA.subtract(bdB);

    String res2 = bdR.toPlainString();

    // Compare the results
    String message = "For operation " + a.toFormalString() + " - " + b.toFormalString();
    assertEquals(message, res2, res1);
  }
During earlier code testing, if we found errors, test them here as regression tests.
common/src/test/org/apache/hadoop/hive/common/type/TestDecimal128.java