function MathContext() {
  //-- members
  this.digits = 0;
  this.form = 0; // values for this must fit in a byte
  this.lostDigits = false;
  this.roundingMode = 0;

  //-- overloaded ctor
  var setform = this.DEFAULT_FORM;
  var setlostdigits = this.DEFAULT_LOSTDIGITS;
  var setroundingmode = this.DEFAULT_ROUNDINGMODE;
  if (MathContext.arguments.length == 4)
   {
    setform = MathContext.arguments[1];
    setlostdigits = MathContext.arguments[2];
    setroundingmode = MathContext.arguments[3];
   }
  else if (MathContext.arguments.length == 3)
   {
    setform = MathContext.arguments[1];
    setlostdigits = MathContext.arguments[2];
   }
  else if (MathContext.arguments.length == 2)
   {
    setform = MathContext.arguments[1];
   }
  else if (MathContext.arguments.length != 1)
   {
    throw "MathContext(): " + MathContext.arguments.length + " arguments given; expected 1 to 4";
   }
  var setdigits = MathContext.arguments[0];


  // set values, after checking
  if (setdigits!=this.DEFAULT_DIGITS)
   {
    if (setdigits<this.MIN_DIGITS)
     throw "MathContext(): Digits too small: "+setdigits;
    if (setdigits>this.MAX_DIGITS)
     throw "MathContext(): Digits too large: "+setdigits;
   }
  {/*select*/
  if (setform==this.SCIENTIFIC)
   {} // [most common]
  else if (setform==this.ENGINEERING)
   {}
  else if (setform==this.PLAIN)
   {}
  else{
   throw "MathContext() Bad form value: "+setform;
  }
  }
  if ((!(this.isValidRound(setroundingmode))))
   throw "MathContext(): Bad roundingMode value: "+setroundingmode;
  this.digits=setdigits;
  this.form=setform;
  this.lostDigits=setlostdigits; // [no bad value possible]
  this.roundingMode=setroundingmode;
  return;}
Constructs a new <code>MathContext</code> with a specified
precision, form, lostDigits, and roundingMode setting.

An <code>IllegalArgumentException</code> is thrown if the
<code>setdigits</code> parameter is out of range
(&lt;0 or &gt;999999999), or if the value given for the
<code>setform</code> or <code>setroundingmode</code> parameters is
not one of the appropriate constants.

@param setdigits       The <code>int</code> digits setting
                       for this <code>MathContext</code>.
@param setform         The <code>int</code> form setting
                       for this <code>MathContext</code>.
@param setlostdigits   The <code>boolean</code> lostDigits
                       setting for this <code>MathContext</code>.
@param setroundingmode The <code>int</code> roundingMode setting
                       for this <code>MathContext</code>.
@throws IllegalArgumentException parameter out of range.
@stable ICU 2.0