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

196

16488 readers
1548 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
[โ€“] GTG3000@programming.dev 51 points 11 months ago (15 children)

I'm with the right answer here. / and * have same precedence and if you wanted to treat 2(2+2) as a single unit, you should have written it like (2*(2+2)).

[โ€“] sushibowl@feddit.nl 75 points 11 months ago (13 children)

It's pretty common even in academic literature to treat implied multiplication as having higher precedence than explicit multiplication/division. Otherwise an expression like 1 / 2n would have to be interpreted as (1 / 2) * n rather than the more natural 1 / (2 * n).

A lot of this bullshit can be avoided with better notation systems, but calculators tend to be limited in what you can write, so meh. Unless you want to mislead people for the memes, just put parentheses around things.

load more comments (12 replies)
load more comments (13 replies)