• 0ops@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    By that logic it could just as well be 2 + 4 * 2 = (2 + 4) + (2 + 4) = 12. You still need to know to multiply first, or it’s arbitrary

    • foo@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      It’s not logic, it’s that what it means. 2*4 literally means 2+2+2+2. Just like 8/2 means how many times you can add 2 to itself until you get 8.

      That’s what it means.

      So why use braces? Because in more advanced maths you have more complex expressions that can’t be express in just multiplication which often occur in algebra or beyond.

      For example what does 2 * ( a + 3) actually mean? Like why do we need to do the addition first. Its because we don’t know how many times we need to repeat the addition until we know what a means.

      Let’s say a are points on an axis, and at some point it is worth three the. At that moment that expression is 2 * (3 +3) = 2 * 6 which is equal to 2+2+2+2+2

      But in the next moment a might be 1

      Right?

      What’s arbitrary are the labels on the rules. The rules themselves aren’t arbitrary.