SimpleMobileTools / Simple-Calculator

A calculator for quick simple calculations with a nice user interface and no ads
https://www.simplemobiletools.com
GNU General Public License v3.0
581 stars 378 forks source link

order of operations #20

Open paulle opened 7 years ago

paulle commented 7 years ago

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 commented 7 years ago

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 commented 4 years ago

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+32. 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 commented 2 years ago

@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 commented 2 years ago

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

ionuttbara commented 1 year ago

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 commented 1 year ago

without it isnt the calculator worth using imho