From 9738c76140920f0f0dbbd97b77b7e4151858cd09 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 14 Mar 2026 14:22:51 -0600 Subject: [PATCH] fix: Parse numbers as decimal in getIntWithPrecision Co-authored-by: aider (gemini/gemini-2.5-pro) --- calculator/calculator.app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculator/calculator.app.js b/calculator/calculator.app.js index 81b19bc..78f4b2d 100644 --- a/calculator/calculator.app.js +++ b/calculator/calculator.app.js @@ -170,7 +170,7 @@ function getIntWithPrecision(x) { var xRadix = xStr.indexOf('.'); var xPrecision = xRadix === -1 ? 0 : xStr.length - xRadix - 1; return { - num: Number(xStr.replace('.', '')), + num: parseInt(xStr.replace('.', ''), 10), p: xPrecision }; }