docs: function BigNumber( n, b ) {
              var c, e, i, num, len, str,
                  x = this;
  
              // Enable constructor usage without new.
              if ( !( x instanceof BigNumber ) ) {
  
                  // 'BigNumber() constructor call without new: {n}'
                  if (ERRORS) raise( 26, 'constructor call without new', n );
                  return new BigNumber( n, b );
              }
  
              // 'new BigNumber() base not an integer: {b}'
              // 'new BigNumber() base out of range: {b}'
              if ( b == null || !isValidInt( b, 2, 64, id, 'base' ) ) {
  
                  // Duplicate.
                  if ( n instanceof BigNumber ) {
                      x.s = n.s;
                      x.e = n.e;
                      x.c = ( n = n.c ) ? n.slice() : n;
                      id = 0;
                      return;
                  }
  
                  if ( ( num = typeof n == 'number' ) && n * 0 == 0 ) {
                      x.s = 1 / n < 0 ? ( n = -n, -1 ) : 1;
  
                      // Fast path for integers.
                      if ( n === ~~n ) {
                          for ( e = 0, i = n; i >= 10; i /= 10, e++ );
                          x.e = e;
                          x.c = [n];
                          id = 0;
                          return;
                      }
  
                      str = n + '';
                  } else {
                      if ( !isNumeric.test( str = n + '' ) ) return parseNumeric( x, str, num );
                      x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1;
                  }
              } else {
                  b = b | 0;
                  str = n + '';
  
                  // Ensure return value is rounded to DECIMAL_PLACES as with other bases.
                  // Allow exponential notation to be used with base 10 argument.
                  if ( b == 10 ) {
                      x = new BigNumber( n instanceof BigNumber ? n : str );
                      return round( x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE );
                  }
  
                  // Avoid potential interpretation of Infinity and NaN as base 44+ values.
                  // Any number in exponential form will fail due to the [Ee][+-].
                  if ( ( num = typeof n == 'number' ) && n * 0 != 0 ||
                    !( new RegExp( '^-?' + ( c = '[' + ALPHABET.slice( 0, b ) + ']+' ) +
                      '(?:\\.' + c + ')?$',b < 37 ? 'i' : '' ) ).test(str) ) {
                      return parseNumeric( x, str, num, b );
                  }
  
                  if (num) {
                      x.s = 1 / n < 0 ? ( str = str.slice(1), -1 ) : 1;
  
                      if ( ERRORS && str.replace( /^0\.0*|\./, '' ).length > 15 ) {
  
                          // 'new BigNumber() number type has more than 15 significant digits: {n}'
                          raise( id, tooManyDigits, n );
                      }
  
                      // Prevent later check for length on converted number.
                      num = false;
                  } else {
                      x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1;
                  }
  
                  str = convertBase( str, 10, b, x.s );
              }
  
              // Decimal point?
              if ( ( e = str.indexOf('.') ) > -1 ) str = str.replace( '.', '' );
  
              // Exponential form?
              if ( ( i = str.search( /e/i ) ) > 0 ) {
  
                  // Determine exponent.
                  if ( e < 0 ) e = i;
                  e += +str.slice( i + 1 );
                  str = str.substring( 0, i );
              } else if ( e < 0 ) {
  
                  // Integer.
                  e = str.length;
              }
  
              // Determine leading zeros.
              for ( i = 0; str.charCodeAt(i) === 48; i++ );
  
              // Determine trailing zeros.
              for ( len = str.length; str.charCodeAt(--len) === 48; );
              str = str.slice( i, len + 1 );
  
              if (str) {
                  len = str.length;
  
                  // Disallow numbers with over 15 significant digits if number type.
                  // 'new BigNumber() number type has more than 15 significant digits: {n}'
                  if ( num && ERRORS && len > 15 && ( n > MAX_SAFE_INTEGER || n !== mathfloor(n) ) ) {
                      raise( id, tooManyDigits, x.s * n );
                  }
  
                  e = e - i - 1;
  
                   // Overflow?
                  if ( e > MAX_EXP ) {
  
                      // Infinity.
                      x.c = x.e = null;
  
                  // Underflow?
                  } else if ( e < MIN_EXP ) {
  
                      // Zero.
                      x.c = [ x.e = 0 ];
                  } else {
                      x.e = e;
                      x.c = [];
  
                      // Transform base
  
                      // e is the base 10 exponent.
                      // i is where to slice str to get the first element of the coefficient array.
                      i = ( e + 1 ) % LOG_BASE;
                      if ( e < 0 ) i += LOG_BASE;
  
                      if ( i < len ) {
                          if (i) x.c.push( +str.slice( 0, i ) );
  
                          for ( len -= LOG_BASE; i < len; ) {
                              x.c.push( +str.slice( i, i += LOG_BASE ) );
                          }
  
                          str = str.slice(i);
                          i = LOG_BASE - str.length;
                      } else {
                          i -= len;
                      }
  
                      for ( ; i--; str += '0' );
                      x.c.push( +str );
                  }
              } else {
  
                  // Zero.
                  x.c = [ x.e = 0 ];
              }
  
              id = 0;
          }