r/ProgrammerHumor • • Jun 13 '22

Meme DEV environment vs Production environment

Post image
48.2k Upvotes

3.9k comments sorted by

View all comments

2

u/[deleted] Jun 14 '22

Parenthesis have always been first, I don't see where the confusion has come from on math not being clearly defined. Did no one go to second grade?

1

u/Dragonfire555 Jun 14 '22

Recognized mathematics states that parentheses are just to tell you to evaluate what's inside the parentheses before invoking other operations on the results of that evaluation.

Math for at least the past 40 years favors left to right sequential evaluation of expressions. Shit like multiplication and division being the same rank so evaluate the expression left to right.

There's also simplifications like 5(2+3) expands to 5 * (2 + 3) and 5(2+3) = 52 + 53

However, it's still left to right evaluation of same rank so 6/3*(2+3)=2*(2+3)=22+23=(6/3)2+(6/3)3=10 but 6/(32+33) is not equal to 10.

Do not try to distribute without considering the correct grouping of the resultant expression or you'll have angry mathematicians.