function toExponential (value, precision) {
  if (precision !== undefined) {
    return value.toExponential(precision - 1) // Note the offset of one
  } else {
    return value.toExponential()
  }
}
Format a number in exponential notation. Like '1.23e+5', '2.3e+0', '3.500e-3'
@param {BigNumber} value
@param {number} [precision]  Number of digits in formatted output.
                             If not provided, the maximum available digits
                             is used.
@returns {string} str