• remon@ani.social
    link
    fedilink
    arrow-up
    5
    ·
    3 days ago

    The precedences go like this:

    parentheses > exponents > (multiplication = division) > (addition = substraction)

    If you encounter operators with the same precedence (like multiplication and division) you go by the order they appear in the equation, left to right. That is how it works.

    • Atomic@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      Yes. I am well aware. 6 ÷ 2 * (2+1) = (2+1) * 6 ÷ 2 = (6 * (2+1))÷2 = 6 * (2+1) ÷ 2

      What he wanted to do is 6 ÷ (2 * (2+1))

      But this just comes down to if you treat 2(2+1) as one or two expressions.

      And honestly, i don’t blame anyone for thinking one way or the other. Because i think most people understand that we wanted to write (2(2+1)), just that the overall parentheses is implied

      Why i deleted that first comment within seconds was because i saw i had misread the meme as (6÷2)(2(2+1))