this post was submitted on 03 Dec 2023
203 points (100.0% liked)

196

667 readers
72 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
[–] arisunz@lemmy.blahaj.zone 19 points 11 months ago (14 children)

this comment section illustrates perfectly why i hate maths so much lmao

love ambiguous, confusing rules nobody can even agree on!

[–] 4am@lemm.ee 7 points 11 months ago (6 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.

[–] hallettj 7 points 11 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 2 points 11 months ago (1 children)

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

[–] hallettj 3 points 11 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 8 months ago

The parentheses step only covers expressions inside parentheses

No, it doesn't

[–] SmartmanApps@programming.dev 1 points 8 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

load more comments (3 replies)
load more comments (10 replies)