Skip to content

Conversation

@markonnn
Copy link

I upgraded the code so the calculator can handle long, complex equations instead of just one simple math expression at a time.

key improvements:

  • Implemented a parse_and_calculate method using regular expressions to replace step by step logic. The calculator now handles complex strings
  • Added scientific functions (trigonometric, logarithmic, constants, abs, round) and large factorial support: if a number is too big to calculate normally, the calculator now uses a log gamma approximation
  • Enabled auto-fix for parentheses to automatically finish equations if a bracket is left open
  • Updated the UI with a redesigned layout using frames, added parentheses and backspace buttons and enabled enter key evaluation
  • Included unit tests to verify complex expressions and operator behaviour

All existing basic calculator functionality is preserved

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.

1 participant