code: function Decimal(value) {
        var x = this;
  
        // Decimal called without new.
        if (!(x instanceof Decimal)) return new Decimal(value);
  
        // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor
        // which points to Object.
        x.constructor = Decimal;
  
        // Duplicate.
        if (value instanceof Decimal) {
          x.s = value.s;
          x.e = value.e;
          x.d = (value = value.d) ? value.slice() : value;
          return;
        }
  
        if (typeof value === 'number') {
  
          // Reject Infinity/NaN.
          if (value * 0 !== 0) {
            throw Error(invalidArgument + value);
          }
  
          if (value > 0) {
            x.s = 1;
          } else if (value < 0) {
            value = -value;
            x.s = -1;
          } else {
            x.s = 0;
            x.e = 0;
            x.d = [0];
            return;
          }
  
          // Fast path for small integers.
          if (value === ~~value && value < 1e7) {
            x.e = 0;
            x.d = [value];
            return;
          }
  
          return parseDecimal(x, value.toString());
        } else if (typeof value !== 'string') {
          throw Error(invalidArgument + value);
        }
  
        // Minus sign?
        if (value.charCodeAt(0) === 45) {
          value = value.slice(1);
          x.s = -1;
        } else {
          x.s = 1;
        }
  
        if (isDecimal.test(value)) parseDecimal(x, value);
        else throw Error(invalidArgument + value);
      }
docs: /*
  The Decimal constructor and exported function.
  Return a new Decimal instance.
  
  value {number|string|Decimal} A numeric value.