• KubeRoot@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    3
    ·
    16 days ago

    If you have a bunch of unparenthesized addition and subtraction, left to right doesn’t matter.

    Right, because 1-2-3=3-2-1.

      • KubeRoot@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        2
        ·
        15 days ago

        I did not flip any signs, merely reversed the order in which the operations are written out. If you read the right side from right to left, it has the same meaning as the left side from left to right.

        Hell, the convention that the sign is on the left is also just a convention, as is the idea that the smallest digit is on the right (which should be a familiar issue to programmers, if you look up big endian vs little endian)

        • I did not flip any signs

          Yes you did! 😂

          merely reversed the order in which the operations are written out

          No, merely reversing the order gives -3-2+1 - you changed the signs on the 1 and 3.

          If you read the right side from right to left, it

          Starts with -3, which you changed to +3

          it has the same meaning as the left side from left to right

          when you don’t change any of the signs it does 😂

          Hell, the convention that the sign is on the left is also just a convention

          Nope, it’s a rule of Maths, Left Associativity.

        • howrar@lemmy.ca
          link
          fedilink
          English
          arrow-up
          2
          ·
          10 days ago

          If that’s your idea of reversing the order, then you’re not talking about the same thing as [email protected]. They’re talking about the order of operations and the associativity/commutativity property. You’re talking about the order of the symbols.