fix: Relax scientific notation display trigger

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-03-14 15:29:41 -06:00
committed by Tanner
parent 6b7285a017
commit ebb1550fc7
+1 -1
View File
@@ -266,7 +266,7 @@ function displayOutput(num) {
var numStr = num.toString(); var numStr = num.toString();
var displayStr; var displayStr;
if (typeof num === 'number' && (g.stringWidth(numStr) > g.getWidth() - 20 || (num !== 0 && Math.abs(num) < 1e-4))) { if (typeof num === 'number' && (numStr.indexOf('e') > -1 || (num !== 0 && Math.abs(num) < 1e-6))) {
// try to format as scientific notation // try to format as scientific notation
let precision = 10; // start with high precision let precision = 10; // start with high precision
while (precision >= 0) { while (precision >= 0) {