fix: Relax scientific notation display trigger
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -266,7 +266,7 @@ function displayOutput(num) {
|
||||
var numStr = num.toString();
|
||||
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
|
||||
let precision = 10; // start with high precision
|
||||
while (precision >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user