function normalizeFormatOptions (options) {
  // default values for options
  let notation = 'auto'
  let precision
  let wordSize

  if (options !== undefined) {
    if (isNumber(options)) {
      precision = options
    } else if (isBigNumber(options)) {
      precision = options.toNumber()
    } else if (isObject(options)) {
      if (options.precision !== undefined) {
        precision = _toNumberOrThrow(options.precision, () => {
          throw new Error('Option "precision" must be a number or BigNumber')
        })
      }

      if (options.wordSize !== undefined) {
        wordSize = _toNumberOrThrow(options.wordSize, () => {
          throw new Error('Option "wordSize" must be a number or BigNumber')
        })
      }

      if (options.notation) {
        notation = options.notation
      }
    } else {
      throw new Error('Unsupported type of options, number, BigNumber, or object expected')
    }
  }

  return { notation, precision, wordSize }
}
Normalize format options into an object:
  {
    notation: string,
    precision: number | undefined,
    wordSize: number | undefined
  }