Skip to content

Fix: resolve calculator logic and UI bugs [Issue]#399#717

Open
Sanjhivvarshan-b-s wants to merge 1 commit into
steam-bell-92:mainfrom
Sanjhivvarshan-b-s:fix-calculator-new
Open

Fix: resolve calculator logic and UI bugs [Issue]#399#717
Sanjhivvarshan-b-s wants to merge 1 commit into
steam-bell-92:mainfrom
Sanjhivvarshan-b-s:fix-calculator-new

Conversation

@Sanjhivvarshan-b-s
Copy link
Copy Markdown
Contributor

📝 Description

This PR resolves critical logic bugs and UI edge cases within the calculator.js component. I have made changes to the files and added some extra features as well.

What I Fixed:

  1. Fixed the "Error" screen: The calculator now automatically resets if you try to type a new number after getting an error.
  2. Fixed crashing: Stopped the calculator from breaking if you press a math button (like sin or sqrt) before finishing an equation.
  3. Fixed trigonometry math: Updated sin, cos, and tan to use standard degrees instead of radians so they give the right answers.
  4. Fixed display symbols: Made the screen show proper math symbols (× and ÷) instead of computer code symbols (* and /).
  5. Fixed keyboard glitch: Stopped a background bug that was causing the calculator to type numbers twice when using your keyboard.

🔗 Linked Issue

Closes #399


📋 Contribution Checklist

  • My code strictly adheres to the project guidelines (Standard library only, procedural code, clean spacing).
  • I have verified that my files are placed in the correct directory.
  • I have tested my changes thoroughly on my local machine.
  • I have included interactive emojis and clean console/UI outputs.
  • GSSoC 2026: I have been formally assigned to this issue and noted it above.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

@Sanjhivvarshan-b-s is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Sanjhivvarshan-b-s
Copy link
Copy Markdown
Contributor Author

Hi @steam-bell-92 I've made all the changes and bug fixes and submitted the PR.

@Sanjhivvarshan-b-s Sanjhivvarshan-b-s changed the title Fix: resolve calculator logic and UI bugs Fix: resolve calculator logic and UI bugs [Issue]#399 May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 [Bug]: Multiple logic and UI edge cases in Ultra Pro Calculator

1 participant