code: def _format_bf(bf, precision=3, trim='0'):
      
      if bf >= 1e4 or bf <= 1e-4:
          out = np.format_float_scientific(bf, precision=precision, trim=trim)
      else:
          out = np.format_float_positional(bf, precision=precision, trim=trim)
      return out
docs: Format BF10 to floating point or scientific notation.