421
submitted 1 year ago by Toes@ani.social to c/196
you are viewing a single comment's thread
view the rest of the comments
[-] synae@lemmy.sdf.org 2 points 1 year ago* (last edited 1 year ago)

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 9 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.

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

196

16757 readers
2578 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 2 years ago
MODERATORS