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:
+5
-1
@@ -199,7 +199,11 @@ const finiteTestNumbers = testNumbers.filter(n => isFinite(n));
|
|||||||
|
|
||||||
// Helper to press a number, handling negatives
|
// Helper to press a number, handling negatives
|
||||||
function pressNumber(n) {
|
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('-')) {
|
if (s.startsWith('-')) {
|
||||||
press(s.substring(1));
|
press(s.substring(1));
|
||||||
buttonPress('N');
|
buttonPress('N');
|
||||||
|
|||||||
Reference in New Issue
Block a user