this post was submitted on 03 Dec 2023
419 points (99.8% liked)

196

16320 readers
2487 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] 4am@lemm.ee 8 points 10 months ago (3 children)

PEMDAS

Parenthesis, exponents, multiplication, division, addition, subtraction.

The rule is much older than me and they taught it in school. Nothing ambiguous about it, homie. The phone app is fucked up. Calculator nailed it.

[–] Coreidan@lemmy.world 11 points 10 months ago (2 children)

Left to right. If you’re following ALL of the rules of PEMDAS then the answer is 16

[–] 50MYT@aussie.zone 2 points 10 months ago (4 children)

Multiplication before division bro.

The division goes last.

Answer is 1.

[–] Zagorath@aussie.zone 8 points 10 months ago (1 children)

The answer is 1, but the logic you've used to get there is a little off. Different groups actually follow different logic, but they usually arrive at the same end-point.

The American Mathematical Society goes:

  • Brackets
  • Indices
  • Multiplication indicated by juxtaposition
  • Regular multiplication and division
  • Addition and subtraction

While the American Physical Society does

  • Brackets
  • Indices
  • Multiplication
  • Division
  • Addition and subtraction

In both cases, addition and subtraction are equal in priority (this solves the problem brought up by a different comment where following primary school BIDMAS would mean 8-4+2=2). In one case (and this is the way I prefer to do it) they solve the problem by declaring that implicit multiplication is done before division, but explicit multiplication with the × sign follows the same rules you would have learnt in primary school. The other says all multiplication is done before division, including explicit multiplication.

[–] SmartmanApps@programming.dev 1 points 6 months ago

follows the same rules you would have learnt in primary school

It's never that - that's how people are getting the wrong answer. In high school you get taught about The Distributive Law.

[–] NikkiNikkiNikki@kbin.social 7 points 10 months ago (1 children)

Multiplication and division have the same priority, whichever one comes first LTR is the one that gets resolved first, so it's (8 / 2) * 4

[–] SmartmanApps@programming.dev 1 points 6 months ago

it’s (8 / 2) * 4

It's 8/2(2+2)=8/(4+4) or 8/2(2+2)=8/2(4)=8/(2x4)

[–] jlh@lemmy.jlh.name 5 points 10 months ago

By that logic: 8-2+4=2

Of course, it could be kind of ambiguous, but typical convention gives multiplication/division the same priority, as it does addition/subtraction.

And in general, you need to go left to right when dealing with division and subtraction, if other operations have the same priority.

[–] SmartmanApps@programming.dev 1 points 6 months ago

Right answer but wrong reason. It's because distribution comes first

[–] SmartmanApps@programming.dev 1 points 6 months ago

If you’re following ALL of the rules of PEMDAS then the answer is

...1. If you got 16 then there's one or more rules that you didn't obey.

[–] hallettj@beehaw.org 6 points 10 months ago (2 children)

The comment from subignition explains that the phone's answer, 16, is what you get by strictly following PEMDAS: the rule is that multiplication and division have the same precedence, and you evaluate them from left-to-right.

The calculator uses a different convention where either multiplication has higher priority than division, or where "implicit" multiplication has higher priority (where there is no multiply sign between adjacent expressions).

[–] I_am_10_squirrels@beehaw.org 2 points 10 months ago (1 children)

But explicit multiplication is part of the parenthesis, so still comes before division or exponent

[–] hallettj@beehaw.org 3 points 10 months ago (1 children)

The parentheses step only covers expressions inside parentheses. That's 2 + 2 in this case. The times-2 part is outside the parentheses so it's evaluated in a different step.

[–] SmartmanApps@programming.dev 1 points 6 months ago

The parentheses step only covers expressions inside parentheses

No, it doesn't

[–] SmartmanApps@programming.dev 1 points 6 months ago

16, is what you get by strictly following PEMDAS

except 1 is what you get from strictly following PEMDAS. If you got 16 then you missed one of more rules.

the rule is that multiplication and division have the same precedence, and you evaluate them from left-to-right

Go back and read your link again. You'll find they're obeying The Distributive Law. i.e. solve all brackets first, from inner-most out.

“implicit” multiplication

There's no such thing as implicit multiplication

[–] arisunz@lemmy.blahaj.zone 3 points 10 months ago* (last edited 10 months ago)

i know about pemdas and also my brother in christ half the people in the comments are saying the phone app is right lmao

edit: my first answer was 16