import { formatDecimalParts as f } from "./formatDecimal.js";
var m;
function l(n, t) {
  var a = f(n, t);
  if (!a) return m = void 0, n.toPrecision(t);
  var e = a[0], o = a[1], r = o - (m = Math.max(-8, Math.min(8, Math.floor(o / 3))) * 3) + 1, i = e.length;
  return r === i ? e : r > i ? e + new Array(r - i + 1).join("0") : r > 0 ? e.slice(0, r) + "." + e.slice(r) : "0." + new Array(1 - r).join("0") + f(n, Math.max(0, t + r - 1))[0];
}
export {
  l as default,
  m as prefixExponent
};
