fix: Convert scientific notation to decimal for test input

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-03-14 17:39:40 -06:00
committed by Tanner
parent abe931d61d
commit 73cd819e94
+5 -1
View File
@@ -199,7 +199,11 @@ const finiteTestNumbers = testNumbers.filter(n => isFinite(n));
// Helper to press a number, handling negatives
function pressNumber(n) {
const s = String(n);
let s = String(n);
// If string representation is in scientific notation, convert to decimal string
if (s.includes('e')) {
s = n.toFixed(20).replace(/0+$/, '').replace(/\.$/, '');
}
if (s.startsWith('-')) {
press(s.substring(1));
buttonPress('N');