test: Expect 0 for sin/tan(PI) results due to float correction

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-03-14 17:58:33 -06:00
committed by Tanner
parent d2c4be15d0
commit df0a2c03fc
+3 -3
View File
@@ -548,17 +548,17 @@ test('Trig functions with Pi (rad)', () => {
press('p'); press('p');
press('sin'); 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('R'); press('R');
press('p'); press('p');
press('cos'); press('cos');
checkDisplay(Math.cos(Math.PI)); // -1 checkDisplay(-1);
press('R'); press('R'); press('R'); press('R');
press('p'); press('p');
press('tan'); 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 buttonPress('angleMode'); // switch back to DEG
assert.strictEqual(scientificOperators.angleMode.val, 'deg'); assert.strictEqual(scientificOperators.angleMode.val, 'deg');