Let's say a user inputs two different string, expecting a result for each one. They both contain either addition or subtraction of a percentage. How should this be handled?
My immediate thoughts are that addition and subtraction are commutative, and when we talk about "adding 10%" to a number, or "subtracting 20%", what we are really talking about is multiplying by 110%, or 80% respectively.
Examples
10 + 5 - 10% and 10 - 10% + 5.
Google
10 + 5 - 10% = 14.5
10 - 10% + 5 = 14
Wolfram Alpha
10 + 5 - 10% = 13.5
10 - 10% + 5 = 13.5
web2.0calc.com
10 + 5 - 10% = 13.5
10 - 10% + 5 = 14
Excel
=10 + 5 - 10% = 1490% = 14.9
=10 - 10% + 5 = 1490% = 14.9
Casio Calculator
10 + 5 - 10% = 14.5
10 - 10% + 5 = 14
1 + 2 * 3 = 9while others say1 + 2 * 3 = 7: it is up to you as the designer. – Henry Sep 14 '15 at 22:18+ 10%to beingx 110%and-20%to* 80%. – Lewis Goddard Sep 14 '15 at 22:25