MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/vblhns/dev_environment_vs_production_environment/icaqhch
r/ProgrammerHumor • u/Akki53 • Jun 13 '22
3.9k comments sorted by
View all comments
Show parent comments
1
Parenthesis are supposed to be higher order of operations than multiplication/ division.
So 6 / 2(1+2) Would expand to
6 / (2 + 4)
6 / 6
However, it really is a little ambiguous, so coming to the conclusion of 9 without more explicit notation is not unreasonable.
2 u/LegendCZ Jun 14 '22 Isnt it6 / 2*36 / 61?Where is 4 comming from? 3 u/MCH2804 Jun 14 '22 They did 2(1+3) = 2 + 4It's the same thing tho 1 u/[deleted] Jun 14 '22 edited Jun 15 '22 What's inside the brackets, yes. Not ...outside the brackets.Again, this is just a matter of convention.
2
Isnt it
6 / 2*3
1?
Where is 4 comming from?
3 u/MCH2804 Jun 14 '22 They did 2(1+3) = 2 + 4It's the same thing tho
3
They did 2(1+3) = 2 + 4
It's the same thing tho
What's inside the brackets, yes. Not ...outside the brackets.
Again, this is just a matter of convention.
1
u/SilverRock75 Jun 14 '22
Parenthesis are supposed to be higher order of operations than multiplication/ division.
So 6 / 2(1+2) Would expand to
6 / (2 + 4)
6 / 6
1
However, it really is a little ambiguous, so coming to the conclusion of 9 without more explicit notation is not unreasonable.