# 0+50x1-60-60x0+10=??

1. Aug 1, 2016

### davenn

hi gang

this came up in one of those crazy facebook challenges
and you can imagine the arguments that ensued

My maths knowledge isn't brilliant .... so in the above, if there are no brackets,
do you still do the multiplication first or do you just work your way through from end to end ?

I thought, regardless of brackets being there or not, I should follow the mult. first rule, giving result of 0
Now I'm not so sure, maybe those who just worked from end to end and got the answer of 10
are the people that are correct ?

regards
Dave

2. Aug 1, 2016

### Staff: Mentor

Edit: even modern programming editors read it this way, hell, even Excel does.

3. Aug 1, 2016

### davenn

OK, so the multiplication rule is followed even if there are no brackets

4. Aug 1, 2016

### andrewkirk

It makes me think that a good party game (for maths nerds at least) would be to write an expression like the above that gives the same answer both ways - ie respecting operator precedence and ignoring it in favour of strict left to right evaluation. No brackets allowed, of course.

Given a time limit of say thirty seconds, points could be awarded based on length of expression, number of operators, and how many of the numerals 0-9 are used, in order to determine a winner.

Or - to prevent somebody using an expression they've used before - first roll a dice a few times to randomly identify three or four numerals that are not allowed to be used.

5. Aug 1, 2016

### Staff: Mentor

Especially then!

6. Aug 1, 2016

### Staff: Mentor

Just a simple remark on this.
Most people use this in everyday life, at least if they do some do-it-yourself works or sum up their shopping costs.
$5A + 2A$ is, if we make it exact $5 \cdot A + 2 \cdot A = 7 \cdot A$. The same with meters. And it's the reason why we cannot add $1$ to $1m$. The multiplication at the meter comes first and before addition can take place.

7. Aug 1, 2016

### davenn

ohhh really ! wow
shows you how bad my maths abilities are hahaha
I failed school cert maths twice

8. Aug 1, 2016

Question on Excel spreadsheet: At one time a few years ago -5^2+3 would give you 28. The leading "-" in an expression would always be evaluated first. To get it to read it properly, you would need to put parenthesis such as -(5^2)+3. This was even the case in exponentials such as Gaussians. (At least this was the case when these expressions involved cell values, etc.) Does anyone know, has this ever been corrected?

9. Aug 1, 2016

### andrewkirk

It still gives that incorrect result in MS Office Professional Plus 2013.

10. Aug 1, 2016

### davenn

Hi Andrew

sorry for whatever reason, I missed this first comment of yours. You agree with fresh_42 that regardless of if there are brackets or not
you still do multiplication first ?

Dave

11. Aug 1, 2016

### andrewkirk

Not exactly, and I don't think that's what fresh was saying either.
Multiplication is done before addition or subtraction, unless overruled by brackets. So in
(1+2) x 3
we do the addition first because the brackets tell us to, and we get 9. But in
1 + 2 x 3
we do the multiplication first, and we get 7.

The rules can be expressed as an order of precedence, where 'a > b' indicates 'do a before b':

calculations inside brackets > exponentiation > multiplication or division > leftmost calculations

Having done the first three of these, we are left with a string of numbers separated by '+' and '-' signs, which can be evaluated from left to right.

12. Aug 2, 2016

### davenn

outstanding !!

really appreciate the clarification/confirmation
it's what I though but my cage was being rattled by others and I had to check with those that should know

Regards
Dave

13. Aug 2, 2016

### Nidum

Remember BODMAS from school days ?

14. Aug 2, 2016

### davenn

nope hahaha ... no wonder I failed school cert maths twice

The only reason I didn't finish my geology degree was because I hadn't done the two required maths papers
kinda frustrating to know that was all that stood in my path

D

15. Aug 2, 2016

### symbolipoint

No parentheses and no exponents. Multiplications are done first; additions and subtractions from left to right;
result is 0.

16. Aug 7, 2016

### 2milehi

PEDMAS for me.

17. Aug 7, 2016

### symbolipoint

The "B" would mean brackets, so telling "grouping symbols". The "O" is not clear immediately, but could mean "order" as in "degree" or "exponent".

18. Aug 7, 2016

### StevieTNZ

-I- sure do!

Or BEDMAS.

See the page linked with the text BODMAS -- http://www.skillsyouneed.com/num/bodmas.html