From df0a2c03fc0d73dbe4d5b75fbc7f05c8f3eeb129 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 14 Mar 2026 17:58:33 -0600 Subject: [PATCH] test: Expect 0 for sin/tan(PI) results due to float correction Co-authored-by: aider (gemini/gemini-2.5-pro) --- calculator/test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/calculator/test.js b/calculator/test.js index 77888ea..7aac20b 100644 --- a/calculator/test.js +++ b/calculator/test.js @@ -548,17 +548,17 @@ test('Trig functions with Pi (rad)', () => { press('p'); press('sin'); - checkDisplay(Math.sin(Math.PI)); // ~0 + checkDisplay(0); // Math.sin(Math.PI) is ~0, calculator snaps to 0 press('R'); press('R'); press('p'); press('cos'); - checkDisplay(Math.cos(Math.PI)); // -1 + checkDisplay(-1); press('R'); press('R'); press('p'); press('tan'); - checkDisplay(Math.tan(Math.PI)); // ~0 + checkDisplay(0); // Math.tan(Math.PI) is ~0, calculator snaps to 0 buttonPress('angleMode'); // switch back to DEG assert.strictEqual(scientificOperators.angleMode.val, 'deg');