Simple-Calculator icon indicating copy to clipboard operation
Simple-Calculator copied to clipboard

order of operations

Open paulle opened this issue 8 years ago • 8 comments

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.

paulle avatar Feb 02 '17 18:02 paulle

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.

tibbi avatar Feb 02 '17 19:02 tibbi

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.

WddVictor avatar Dec 20 '19 09:12 WddVictor

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

Aga-C avatar Jan 10 '22 19:01 Aga-C

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

tibbi avatar Jan 10 '22 21:01 tibbi

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.

ionuttbara avatar Oct 18 '23 23:10 ionuttbara

without it isnt the calculator worth using imho

inson1 avatar Oct 19 '23 06:10 inson1