From 73cd819e947f5d172ee10bc51d633fde696e2ca4 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 14 Mar 2026 17:39:40 -0600 Subject: [PATCH] fix: Convert scientific notation to decimal for test input Co-authored-by: aider (gemini/gemini-2.5-pro) --- calculator/test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calculator/test.js b/calculator/test.js index 7852334..12b114a 100644 --- a/calculator/test.js +++ b/calculator/test.js @@ -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');