this post was submitted on 19 Jul 2023
817 points (95.6% liked)

Memes

45198 readers
2905 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] kogasa@programming.dev 0 points 1 year ago (1 children)

Your point is not clear.

1 + (2 * 3) by always doing addition first we can remove those brackets.

(1 * 3) + (2 * 3) can be rewritten as (1 + 2) * 3 so using the first rule again makes sense.

Do you see the issue?

[–] nLuLukna@sh.itjust.works 1 points 1 year ago (1 children)

I don't see it mate. So you're going to have to tell me, sorry.

The point I'm trying to make is that using Pemdas/Bedmas is the most effiecent way of removing brackets - I actually don't 100% know that but I doubt it creates hundreds of brackets - if thats slightly clearer.

[–] kogasa@programming.dev 1 points 1 year ago

I don't know how else to explain it. I used your own argument verbatim but with the opposite assumption, that addition takes priority over multiplication. In either case, some expressions can be written without parentheses which require parentheses in the other case.