• GoodEye8@lemm.ee
    link
    fedilink
    English
    arrow-up
    19
    ·
    1 year ago

    Maybe for very simple calculations like this one, but for more complex ones parenthesis actually make them much harder to read and write. If you’ve ever built a complex functions in Excel you know how difficult it gets because for 90% of the excel operations require parenthesis which means it works exactly like you’d want math to work. Just yesterday I had to do a more complex index match search in excel and excel corrected my parenthesis, because when your function is supposed to end with 5 parenthesis good luck keeping track of how many parenthesis you actually need to write out. Similarly if a week later I would have to change something inside that same function it’s going to take a lot more time to deconstruct the formula because of the abundance of parenthesis.

    And the addition of parenthesis in math is entirely unnecessary because the nature of most operators already dictates the order of operations. Exponents are just multiplications and multiplication are just additions. 23 is the same as 2 x 2 x 2 is the same 2 + 2 + 2 + 2. If you take the example in the image then 2 + 2x4 transposed into additions is 2 + (2 + 2 + 2 + 2), parenthesis added to indicate what used to be the multiplication. Why people get it wrong is because they don’t understand the nature of those operators and so they do (2+2)x4 which is how they get (2+2)+(2+2)+(2+2)+(2+2) = 16. The order is clear, you can’t do addition before you do multiplication, because multiplication is a certain form of addition, and you can’t do multiplication before you do exponents, because exponents are a certain form of multiplication. The inverse functions maintain the same order of the function they’re inverting, meaning you can do subtraction before division and you can’t do division before rooting. No need for parenthesis for the natural order of operations. Parenthesis serve a purpose when you need to denote exceptions to the natural order of operations, like (2+2) x 4.

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

      It’s not a “natural” order of operations. Why in the world would you think that we more often add before multiplying instead of vice versa? That’s such a weird claim

      • GoodEye8@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Did you just read the last sentence and not the rest of the comment? I went pretty in depth about what I mean by it. I don’t think we more often add before multiply, I know we must solve multiplication before doing addition and vice versa is the wrong way to do it, unless there’s something else, like parenthesis, stating a different order of operations.