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

196

16549 readers
1982 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
[โ€“] synae@lemmy.sdf.org 2 points 11 months ago* (last edited 11 months ago) (1 children)

PEMDAS is actually (PE)(MD)(AS). Those that are grouped together have equal precedence and are evaluated left to right.

8 / 2 * (2+2)

8 / 2 * 4

4 * 4

16

Edit to fix formatting, maybe?

[โ€“] SmartmanApps@programming.dev 2 points 8 months ago

8 / 2 * (2+2)

When you added the multiply you changed the answer, because the (2+2) is now in the numerator instead of in the denominator.