code: function checkdigits(rhs, dig) {
    if (dig==0)
     return; // don't check if digits=0
    // first check lhs...
    if (this.mant.length>dig)
     if ((!(this.allzero(this.mant,dig))))
      throw "Too many digits: "+this.toString();
    if (rhs==null)
     return; // monadic
    if (rhs.mant.length>dig)
     if ((!(this.allzero(rhs.mant,dig))))
      throw "Too many digits: "+rhs.toString();
    return;
    }
docs: /* <sgml> Check one or two numbers for lost digits. </sgml>
  Arg1 is RHS (or null, if none)
  Arg2 is current DIGITS setting
  returns quietly or throws an exception --private void checkdigits(com.ibm.icu.math.BigDecimal rhs,int dig){