fix: Adjust precision for scientific notation display
This commit is contained in:
@@ -286,7 +286,7 @@ function displayOutput(num) {
|
||||
}
|
||||
var numStr = num.toString();
|
||||
if (typeof num === 'number' && (numStr.length > RESULT_MAX_LEN || (num !== 0 && Math.abs(num) < 1e-4))) {
|
||||
let precision = RESULT_MAX_LEN - 8;
|
||||
let precision = RESULT_MAX_LEN - 5;
|
||||
if (precision < 0) precision = 0;
|
||||
num = toExponential(num, precision).replace("e", "E");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user