diff --git a/src/util/break_eternity.ts b/src/util/break_eternity.ts index 9aae08e..e853751 100644 --- a/src/util/break_eternity.ts +++ b/src/util/break_eternity.ts @@ -48,7 +48,10 @@ export function regularFormat(num: DecimalSource, precision: number): string { return (0).toFixed(precision); } if (num.mag < 0.1 && precision !== 0) { - precision = Math.max(Math.max(precision, 4), projInfo.defaultDecimalsShown); + precision = Math.max( + Math.max(precision, num.log10().negate().ceil().toNumber()), + projInfo.defaultDecimalsShown + ); } return num.toStringWithDecimalPlaces(precision); }