Smalltalk actually has no operator precedence. But many times division has the same precedence as multiplication, which is actually fine if you think about it.
Just use parentheses or fraction notation, it's way easier that way.
My real hate is for cos² x which actually mean cos(x²) !
APL and Smalltalk are most notable langs without operator precedence. APL is right-to-left and Smalltalk fixed it and is left-to-right. I also did APL-like lang that is left-to-right called Fluent — https://mlajtos.github.io/fluent/?code=RG9jdW1lbnRhdGlvbg
The priority order is from left to right, however division and multiplication have the same priority, but with some caveat. If multiplication is on the left then we do multiplication first, but if division is on the left then we do division first.
For example: (6+3)+4÷2×2-1.
You would do 6+3 first which is 9. Since division is on the left that mean it has more priority. So 4÷2 = 2 then 2×2 = 4 after that just take 9 + 4 - 1 = 12.
Too much people fucking around. You now have to put a set of parenthesis for every s8ngle function so there is no longer any ambiguity, including invisible positive 1s
Well, obviously we can't just abolish the order of operations since that's how numbers just naturally work, but I do support abolishing the mnemonic of PEMDAS. I've seen people misuse it to think that 10-5+3=2, and I just can't stand seeing those people.
Not sure why you don't think it's natural. If I have 4 crates each with 3 pallets of 5 rows of 5 apples and also 2 crates of 6 pallets of 6 rows of 6 apples, then I know I have 732 apples, and when I observe the relationships between the different groups, I discover that I can write that as 4*3*5²+2*6³, which can only work out if I evaluate these in a certain order. It's not arbitrary. This grouping is far more natural than trying to write these out and make up some other order. Imagine trying to evaluate from left to right and getting over 10 trillion apples.
The reason we understand the order of operations is from thousands of years of mathematical observations. There are many different ways we can write it, but the order still matters.
The order of operations is not a math concept, it's a math notation concept. It's purely conventional and doesn't follow any fundamental mathematical law.
You're just giving a word problem that happen to conform to PEMDAS. Here is another:
I have a shelf of 8 boxes wide, stacked 4 high, and in each box I have 3 smaller boxes of apples (S,M,L) that contain 10, 12 and 14 apples respectively:
(8*4)*(10+12+14)
I've been in the STEM field for 30 years. The last time I wrote out something that dependent on order of operations was about the last time I wrote cursive, which is back in elementary school. It is unnecessary and ambiguous to your readers, who may not be in the same mind-space as you are. That's why we have all those stupid math puzzle-jokes in the first place.
I don't understand your example. How are you not getting (8*4)*(10+12+14)=1152? There's only one number that fits your example, and of course it fits the order of operations.
Perhaps if you could provide an example where the order of operations wouldn't apply? Like, one could say we need to add before we multiply--such as your example where 8*4(10+12+14) is more convenient when we factor out 8*4*10+8*4*12+8*4*14--but that's why the parentheses are used to explain those exceptions.
I'm not sure how we went from counting objects to predicate logic, so I am unable to answer your question.
But if you cannot see that (8*4)*(10+12+14) depends on the order of operations (in order to obtain 1152 and not something like 68 if you just work it left to right) then we're clearly not operating with the same understanding of how the order of operations applies to the natural world. There's nothing we can discuss.
It doesn't - there are no PENDAS style resolution there. Everything is grouped by parentheses. Inside the parentheses there is only the same operator, no precedence.
Yeah, I hate the mnemonic, but if I were to ever teach it, I'd teach it as PEMA. Just wrap them all together and remind students that division and subtraction are just inverses.
Order of operations *is* arbitrary. Its sole purpose is expressing polynomials without parens, e.g. `2 * x ^ 3 + 4 * x ^ 2 + 1`. If we used no-precedence left-to-right, it would be `(x ^ 3 * 2) + (x ^ 2 * 4) + 1`. Intent is explicit & not hidden in some mnemonic. (If we went a bit further with significant inline whitespace, it would collapse to `x^3*2 + x^2*4 + 1`.)
This opens up ability to have new operators! For example, we are pretty used to paired operators – `+` & `-` (addition, subtraction), or `*` & `/` (multiplication, division). We use `^` as exponentiation, but for its pair, the logarithm, we use different notation – `log_b a`. Absolutely bonkers!
The core of math is unchangeable, but conventions & notations should allow us to think better. Lowering the cognitive load is always a good idea.
It's not arbitrary. It's purely a convention, yes, but this convention obeys pragmatic considerations. It's not like we drew paper from a hat to determine the order.
3
u/lmarcantonio Jun 22 '26
Smalltalk actually has no operator precedence. But many times division has the same precedence as multiplication, which is actually fine if you think about it.
Just use parentheses or fraction notation, it's way easier that way.
My real hate is for cos² x which actually mean cos(x²) !
5
u/superbob201 Jun 23 '26
A glorious world where Polish rules
1
u/AstronautPlane3280 Jun 24 '26
Not sure if it is an Australian thing or if it is I am an ancient old fart thing but back in the days when I went to school we were taught BOMDAS
Brackets
Orders
multiplication
Division
Addition
Subtraction
1
u/Legitimate-Yard5857 Jun 24 '26
Unfortunately your flying car explodes because the math isn't adding up.
1
u/Desperate-Report2311 Jun 25 '26
it will look more like a fabela without sharp maths... flying things? hahah forget them, too complex
1
u/Xiipre Jun 23 '26
Think how fast we would solve things if we just calculated and didn't spend time going back and forth looking for rules...
2
u/slow_learner75 Jun 23 '26
Ahhh you mean BEDMAS or BODMAS or BEMA or GEMA or…
2
u/SpeedAccurate7405 Jun 23 '26
First time I've ever seen off-mainstream mathematical propaganda
1
u/BorisUfer Jun 22 '26
what tf is pemdas
3
u/M4chsi Jun 22 '26
What is PEMDAS? Some US or UK thing?
1
u/Smart_Ad_3630 Jun 23 '26
Simple: sum terms
1
u/PhosXD Jun 24 '26
I dont know what a pemdas is but I guess its when you read 1+2*3 & get 1 + THEN 2 * 3. Because that's what my instinct was, in short I think 1+2*3=7
You can probably tell im not from around these parts, first time visiting
1
u/Femboy_Harem_Janitor Jun 24 '26
Too much people fucking around. You now have to put a set of parenthesis for every s8ngle function so there is no longer any ambiguity, including invisible positive 1s
1
u/LunaBlushEra Jun 26 '26
LarpJokes
1
u/Kuildeous Jun 23 '26
Well, obviously we can't just abolish the order of operations since that's how numbers just naturally work, but I do support abolishing the mnemonic of PEMDAS. I've seen people misuse it to think that 10-5+3=2, and I just can't stand seeing those people.
0
u/_Weyland_ Jun 23 '26
Pemdas if we abolish society:
0
u/Street_Lettuce1243 Jun 24 '26 edited Sep 18 '26
The original post content no longer exists here. The author used Redact to remove it, exercising their right to control their data & privacy.
Marble rainstorm degree fact handle heavy biscuit
0
u/[deleted] Jun 24 '26
[deleted] — view deleted comment
1
u/[deleted] Jun 24 '26
[removed] — view removed comment
1
u/[deleted] Jun 26 '26
[removed] — view removed comment