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

order of operations #20

Open
paulle opened this issue Feb 2, 2017 · 6 comments
Open

order of operations #20

paulle opened this issue Feb 2, 2017 · 6 comments
Labels

Comments

@paulle
Copy link

paulle commented Feb 2, 2017

Order of operations doesn't seem to work.
Example: 2+3*4 result is 20, but that's wrong. The correct result should be 14.

@tibbi tibbi added the bug label Feb 2, 2017
@tibbi
Copy link
Member

tibbi commented Feb 2, 2017

the calculator is quite primitive and can have issues, and it even wont be my priority for some time as other apps perform better. So fixing things could take some time.

@WddVictor
Copy link
Contributor

Actually, I don't think this is a bug. Because this is a simple calculator and the main purpose of this app is not to solve a complex equation like 1+3*2. It should display the result according to the order of the input. When you input the second operation *, the result should just base on the result of the previous operation. But if you do want to solve this, you can use Stack in the method handleCalculation to remember the order of input operations.

@Aga-C
Copy link
Contributor

Aga-C commented Jan 10, 2022

@tibbi Would you like to have this feature? Because, in my opinion, it should be simple with ExpressionBuilder that is used in the code.

@tibbi
Copy link
Member

tibbi commented Jan 10, 2022

no, it isnt on the roadmap now, maybe someday in the scientific calculator

@ionuttbara
Copy link

ionuttbara commented Oct 18, 2023

there is a good calculator project which you can take note.
https://github.com/sadellie/unitto/releases/tag/nadeshiko-pink
so maybe someday simple calculator will be same or better than this app.
this can make order of operations and more and is simple as this app.

@inson1
Copy link

inson1 commented Oct 19, 2023

without it isnt the calculator worth using imho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants