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

196

16557 readers
1627 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
[–] I_am_10_squirrels@beehaw.org 2 points 11 months ago (1 children)

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

[–] hallettj@beehaw.org 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