Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Feature request) Support Parentheses and Order of Operations Handling #35

Closed
6 of 7 tasks
smed79 opened this issue Nov 17, 2024 · 1 comment
Closed
6 of 7 tasks
Labels
duplicate This issue or pull request already exists

Comments

@smed79
Copy link

smed79 commented Nov 17, 2024

Checklist

  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one feature request.
  • I have read and understood the contribution guidelines.
  • I optionally donated to support the Fossify mission.

Feature description

There are a gap relating to the handling of order of operations and the absence of parentheses support. This severely limits the app's functionality.

Problem 1: Premature Evaluation

The calculator evaluates expressions piecemeal instead of waiting for the complete input. For example, entering 1 + 1 + 1 results in 2 being displayed after the second "+" press, instead of waiting for the final "=" to calculate the correct sum of 3.

Problem 2: Missing Parentheses/Brackets

The lack of parentheses/brackets () makes it impossible to perform calculations that require a specific order of operations.

Why do you want this feature?

These two issues combine to make even relatively simple calculations impossible. The calculator is effectively limited to single operations, severely restricting its usefulness.

Implement proper order of operations handling, including support for parentheses. This would allow users to enter complex expressions and ensure they are evaluated correctly.

A simple example like 10 - (10 - 1) (which should equal 1) is not possible due to both the premature evaluation and the lack of parentheses support.

Additional information

This issue needs to be addressed to make the calculator functional for anything beyond basic single-operator arithmetic.

Thank you for your time and attention to this matter.

@smed79 smed79 added feature request Issue is about a new feature in the app needs triage Issue is not yet ready for PR authors to take up labels Nov 17, 2024
@Aga-C
Copy link
Member

Aga-C commented Nov 17, 2024

It's a duplicate of #7.

@Aga-C Aga-C closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2024
@Aga-C Aga-C added duplicate This issue or pull request already exists and removed feature request Issue is about a new feature in the app needs triage Issue is not yet ready for PR authors to take up labels Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants