📝 Description
While testing the "Ultra Pro Calculator" on the web app, I found several logic and UI bugs. Specifically:
- The "Error" State Trap: Appending numbers to an "Error" state breaks the calculator.
- Scientific Function Crash: Pressing
sin, cos, etc., on an incomplete expression (like 5+) throws an evaluation error.
- Radian vs Degree: Trigonometry functions calculate in radians instead of degrees.
- Visual Symbol Mismatch: The UI displays
* and / instead of × and ÷.
and more
🔄 Steps to Reproduce
For the "Error" trap:
- Go to the Web App and open the Ultra Pro Calculator.
- Enter an invalid calculation (e.g.,
5 ÷ 0 = or + =) to trigger the "Error" screen.
- Press the number
5.
- See
Error5 on the display.
For the Radian bug:
- Clear the calculator.
- Press
9, 0, and then sin.
- See incorrect output.
For the Visual bug:
- Press
5, ×, 5.
- See
5*5 on the display instead of 5×5.
🎯 Expected Behavior
- If the screen displays "Error", pressing a new number should clear the screen first.
- Pressing
sin after typing 90 should output 1 (calculating in degrees, not radians).
- Pressing the multiplication or division buttons should visually display
× and ÷ on the screen.
❌ Actual Behavior / Error Logs
- The calculator concatenates strings to the error message (e.g.,
"Error5").
sin(90) outputs 0.8939966636005579 (calculated in radians).
- The display shows programmer symbols (
*, /) instead of standard math symbols.
- Passing incomplete expressions (like
5+) to scientific functions throws a silent JavaScript runtime error and fails to update the UI.
💻 Environment
- OS: Any (Browser-based)
- Python Version: N/A (JavaScript Web App)
📝 Description
While testing the "Ultra Pro Calculator" on the web app, I found several logic and UI bugs. Specifically:
sin,cos, etc., on an incomplete expression (like5+) throws an evaluation error.*and/instead of×and÷.and more
🔄 Steps to Reproduce
For the "Error" trap:
5 ÷ 0 =or+ =) to trigger the "Error" screen.5.Error5on the display.For the Radian bug:
9,0, and thensin.For the Visual bug:
5,×,5.5*5on the display instead of5×5.🎯 Expected Behavior
sinafter typing90should output1(calculating in degrees, not radians).×and÷on the screen.❌ Actual Behavior / Error Logs
"Error5").sin(90)outputs0.8939966636005579(calculated in radians).*,/) instead of standard math symbols.5+) to scientific functions throws a silent JavaScript runtime error and fails to update the UI.💻 Environment
calculator.js