EDIT: Thanks to a helpful comment I see why I was wrong.

  • AbouBenAdhem@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    The standard order of operations is

    1. Parentheses
    2. Exponentiation
    3. Multiplication and division
    4. Addition and subtraction.

    The operations on each row are equivalent, and are executed from left to right.

    • Ember James@lemmy.caOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      Thanks for being helpful. I am not sure how I mixed that up but for some reason in my head I was thinking “Do Addition then (should read “and”) Subtraction in order from left to right”. This is why it is a shower thought and why I am brushing up on my math. haha

      • AbouBenAdhem@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        1 year ago

        If it helps to conceptualize, you can always replace subtraction and division with these equivalents without affecting the order:

        a - b
        = a + -b
        = a + (-1*b)

        and

        a / b
        = a * b-1
        = a * (1/b)