this post was submitted on 31 May 2025
215 points (90.9% liked)

Technology

70550 readers
4051 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] billwashere@lemmy.world 23 points 3 days ago (3 children)

So order of operations is hard?

[–] HereIAm@lemmy.world 12 points 2 days ago (2 children)

The issue normally with these "trick" questions is the ambiguous nature of that division sign (not so much a problem here) or people not knowing to just go left to right when all operators are of the same priority. A common mistake is to think division is prioritised above multiplication, when it actually has the same priority. Someone should have included some parenthesis in PEDMAS aka. PE(DM)(AS) 😄

Another common issue is thinking "parentheses go first" and then beginning by solving the operation beside them (mostly multiplication). The point being that what's inside the parentheses goes first, not what's beside them.

[–] vithigar@lemmy.ca 5 points 2 days ago (3 children)

The same priority operations can be done in any order without affecting the result, that's why they can be same priority and don't need an explicit order.

6 × 4 ÷ 2 × 3 ÷ 9 evaluates the same regardless of order. Can you provide a counter example?

[–] Robust_Mirror@aussie.zone 4 points 2 days ago

Another person already replied using your equation, but I felt the need to reply with a simpler one as well that shows it:

9-1+3=?

Subtraction first:
8+3=11

Addition first:
9-4=5

[–] HereIAm@lemmy.world 6 points 2 days ago* (last edited 2 days ago) (3 children)

So let's try out some different prioritization systems.

Left to right:

(((6 * 4) / 2) * 3) / 9
((24 / 2) * 3) / 9
(12 * 3) / 9
36 / 9 = 4

Right to left:

6 * (4 / (2 * (3 / 9)))  
6 * (4 / (2 * 0.333...))  
6 * (4 / 0.666...)  
6 * 6 = 36

Multiplication first:

(6 * 4) / (2 * 3) / 9  
24 / 6 / 9

Here the path divides again, we can do the left division or right division first.

Left first: 
(24 / 6) / 9  
4 / 9 = 0.444...

Right side first:  
24 / (6 / 9)  
24 / 0.666... = 36

And finally division first:

6 * (4 / 2) * (3 / 9)  
6 * 2 * 0.333...  
12 * 0.333.. = 4 

It's ambiguous which one of these is correct. Hence the best method we have for "correct" is left to right.

[–] vithigar@lemmy.ca 6 points 2 days ago

I stand corrected

[–] Melvin_Ferd@lemmy.world 4 points 2 days ago* (last edited 2 days ago) (1 children)

Maybe I'm wrong but the way I explain it is until the ambiguity is removed by adding in extra information to make it more specific then all those answers are correct.

"I saw her duck"

Until the author gives me clarity then that sentence has multiple meanings. With math, it doesn't click for people that the equation is incomplete. In an English sentence, ambiguity makes more sense and the common sense approach would be to clarify what the meaning is

[–] HereIAm@lemmy.world 2 points 2 days ago (1 children)

100% with you. "Left to right" as far as I can tell only exists to make otherwise "unsolvable" problems a kind of official solution. I personally feel like it is a bodge, and I would rather the correct solution for such a problem to be undefined.

[–] Robust_Mirror@aussie.zone 4 points 2 days ago

It's so we don't have to spam brackets everywhere

9+2-1+6-4+7-3+5=

Becomes

((((((9+2)-1)+6)-4)+7)-3)+5=

That's just clutter for no good reason when we can just say if it doesn't have parentheses it's left to right. Having a default evaluation order makes sense and means we only need parentheses when we want to deviate from the norm.

[–] barsoap@lemm.ee 2 points 2 days ago* (last edited 2 days ago) (1 children)

It’s ambiguous which one of these is correct. Hence the best method we have for “correct” is left to right.

The solution accepted anywhere but in the US school system range from "Bloody use parenthesis, then" over "Why is there more than one division in this formula why didn't you re-arrange everything to be less confusing" to "50 Hertz, in base units, are 50s^-1^".

More practically speaking: Ultimately, you'll want to do algebra with these things. If you rely on "left to right" type of precedence rules re-arranging formulas becomes way harder because now you have to contend with that kind of implicit constraint. It makes everything harder for no reason whatsoever so no actual mathematician, or other people using maths in earnest, use that kind of notation.

[–] HereIAm@lemmy.world 3 points 2 days ago

I fully agree that if it comes down to "left to right" the problem really needs to be rewritten to be more clear. But I've just shown why that "rule" is a common part of these meme problems because it is so weird and quite esoteric.

[–] troistigrestristes@lemmy.eco.br 2 points 2 days ago (1 children)

Oh my god now this is going to be Lemmy’s top thread for 6 months, isn’t it?

Btw, yeah I’m with you on this, you just need to know the priorities and you’re good, because the order doesn’t matter for operations with the same priority

[–] HereIAm@lemmy.world 2 points 2 days ago* (last edited 2 days ago) (1 children)

Except it does matter. I left some examples for another post with multiplication and division, I'll give you some addition and subtraction to see order matter with those operations as well.

Let's take:
1 + 2 - 3 + 4

Addition first:
(1 + 2) - (3 + 4)
3 - 7 = -4

Subtraction first:
1 + (2 - 3) + 4
1 + (-1) + 4 = 4

Right to left:
1 + (2 - (3 + 4))
1 + (2 - 7)
1 + (-5) = -4

Left to right:
((1 + 2) - 3) + 4
(3 - 3) + 4 = 4

Edit: You can argue that, for example, the addition first could be (1 + 2) + (-3 + 4) in which case it does end up as 4, but in my opinion that's another ambiguous case.

Oh, but of course the statement changes if you add parentheses. Basically, you’re changing the effective numbers that are being used, because the parentheses act as containers with a given value (you even showed the effective numbers in your examples).

Get this : + 1 - 1 + 1 - 1 + 1 - 1 + 1

You can change the result several times by choosing where you want to put the parentheses. However, the order of operations of same priority inside a container (parentheses) does not change the resulting value of the container.

In the example, there were no parentheses, so no ambiguity (there wouldn’t be any ambiguity with parentheses either, the correct way of calculating would just change), and I don’t think you can add “ambiguity” by adding parentheses — you’re just changing the effective expression to be evaluated.

By the way, this is the reason why I absolutely overuse parentheses in my engineering code. It can be redundant, but at least I am SURE that it is going to follow the order that I wanted.

[–] Zenith@lemm.ee 2 points 2 days ago

Yeah and I’m tired of pretending it’s not!

[–] Gsus4@mander.xyz 1 points 2 days ago* (last edited 2 days ago)

Next they're going to have an epic debate on whether work done by the system is positive or negative and are all going to feel really smart and passionate about it. Like one of those Science vs Religion debate clubs from the 2000s