code: function toSci(str, minExp = 0, precision = +Infinity) {
    if (!isNumStr(str, 10)) throw new Error('in toSci, string must be an integer in base 10.');
    if (precision <= 0) throw new Error('in toSci, precision must be greater than zero.');
    const minus = String.fromCharCode(consts.minus);
    const point = String.fromCharCode(consts.point);
  
    str = roundInt(str, precision);
  
    // If the number is negative, ignore the negative sign for now.
    let start = (str[0] == minus) ? 1 : 0;
  
    // Determine the exponent.
    let exp = str.length - start - 1;
  
    // If the exponent is less than minExp, return the value in fixed point notation.
    if (exp < minExp) return str;
    
    // Get the integer and fractional parts of the coefficient.
    let integerPart = str[start];
    let fractionalPart = removeTrailingZeros(str.slice(start + 1));
  
    // Express the value in scientific notation.
    let sci = integerPart;
    if (fractionalPart) sci += point + fractionalPart;
    sci += 'e+' + exp.toString();
  
    // If the value was negative, replace the negative sign.
    if (str[0] == minus) sci = minus + sci;
  
    return sci;
  }
docs: /* Convert to scientific notation a base 10 integer in string representation.
  *
  * @param {string} str - The integer to be converted.
  * @param {number} minExp - If the exponent is smaller than this value, the integer will be returned in fixed-point notation.
  * @param {number} precision - Maximum significant digits included in the converted value.
  * @return {string} The converted integer. Undefined if error.