• cerement@slrpnk.net
      link
      fedilink
      arrow-up
      49
      ·
      9 months ago
      • 16 is the right answer if you use PEMDAS only: (8 ÷ 2) × (2 + 2)
      • 1 is the right answer if you use implicit/explicit with PEMDAS: 8 ÷ (2 × (2 + 2))
      • both are correct answers (as in if you don’t put in extra parentheses to reduce ambiguity, you should expect expect either answer)
      • this is also one of the reasons why postfix and prefix notations have an advantage over infix notation
        • postfix (HP, RPN, Forth): 2 2 + 8 2 ÷ × .
        • prefix (Lisp): (× (÷ 8 2) (+ 2 2))
      • brian@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        9 months ago

        prefix notation doesn’t need parentheses either though, at least in this case. lisp uses them for readability and to get multiple arity operators. infix doesn’t have any ambiguity either if you parenthesize all operations like that.

      • 16 is the right answer if you use PEMDAS only: (8 ÷ 2) × (2 + 2)

        You added brackets and changed the answer. 2(2+2) is a single term, and if you break it up then you change the answer (because now the (2+2) is in the numerator instead of in the denominator).

        1 is the right answer

        The only right answer

        both are correct answers

        Nope, 1 is the only correct answer.

        this is also one of the reasons why postfix and prefix notations have an advantage over infix notation

        Except they don’t. This isn’t a notation problem, it’s a people don’t remember the rules of Maths problem.

            • kryptonianCodeMonkey@lemmy.world
              link
              fedilink
              arrow-up
              39
              ·
              edit-2
              9 months ago

              That’s wrong. Multiplication and division have equal precedence, same as addition and subtraction. You do them left to right. PEMDAS could be rewritten like PE(MD)(AS). After parentheses and exponents, it"s Multiplication and division together, then addition and subtraction together. They also teach BODMAS some places, which is “brackets, order, division and multiplication, addition and subtraction” Despite reversing the division and multiplication, it doesn’t change the order of operations. They have the same priority, so they are just done left to right. PEMDAS and BODMAS are the different shorthand for the same order of operations.

              • starman2112@sh.itjust.works
                link
                fedilink
                arrow-up
                0
                ·
                9 months ago

                They were right but for the wrong reason. Implied multiplication–that is, a(b) or ab–often comes before explicit multiplication and division. Apparently it’s up to the person writing the equation, so the meme is intentionally and explicitly ambiguous

                • kryptonianCodeMonkey@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  edit-2
                  9 months ago

                  They’re still wrong, in my humble opinion. I’m aware of this notion, and I’ve even had people share a snip from some book that states this as fact. However, this is not standardized and without the convention being widely understood and recognized as the standard in the world of mathematics (which generally doesn’t use the symbol (÷) at all at post-algebra levels), there is no reason to treat it as such just because a few people assert it is should be.

                  It doesn’t make sense at all to me that implied multiplication would be treated any differently, let alone at a higher priority, than explicit multiplication. They’re both the same operation, just with different notations, the former of which we use as shorthand.

                  There are obviously examples that show the use of the division symbol without parentheses sometimes leads to misunderstandings like this. It’s why that symbol is not used by real mathematicians at all. It is just abundantly more clear what you’re saying if you use the fraction bar notation (the line with numerator on top and denominator on bottom). But the rules as actually written, when followed, only reach one conclusion for this problem and others like it. x÷y(z) is the SAME as x÷y*z. There’s no mathematical or logical reason to treat it differently. If you meant for the implicit multiplication to have priority it should be in parentheses, x÷(y(z)), or written with the fraction bar notation.

                  • I’ve even had people share a snip from some book that states this as fact

                    A Maths textbook.

                    However, this is not standardized

                    It’s standard in every Maths textbook.

                    there is no reason to treat it as such just because a few people assert it is should be

                    The “few people” are Maths teachers and Maths textbook authors.

                    It doesn’t make sense at all to me that implied multiplication would be treated any differently

                    There’s no such thing as implicit multiplication

                    They’re both the same operation

                    No, what people are calling “implicit multiplication” is either The Distributive Law - which is the first step in solving Brackets - or Terms - and neither of these things is “multiplication”. Multiplication literally refers to multiplication symbols only.

                    It’s why that symbol is not used by real mathematicians at all. It is just abundantly more clear what you’re saying if you use the fraction bar notation

                    The division symbol is used - it is not the same thing as a fraction bar.

                    x÷y(z) is the SAME as x÷y*z.

                    No, it’s the same as x÷(y*z).

                    There’s no mathematical or logical reason to treat it differently

                    Terms, The Distributive Law, are why it’s treated differently.

                  • Tlaloc_Temporal@lemmy.ca
                    link
                    fedilink
                    arrow-up
                    0
                    ·
                    9 months ago

                    Implicit multiplication being before regular multiplication/division is so we can write 2y/3x instead of (2y)/(3x). Without priority, 2y/3x becomes (2y÷3)•x.

                    Coefficients are widely used enough that mathematicians don’t want to write parentheses around every single one. So implicit multiplication gets priority.

            • 0ops@lemm.ee
              link
              fedilink
              arrow-up
              8
              ·
              9 months ago

              There’s an argument to be made that implicit multiplication comes before division, resulting in the answer 1, but all multiplication? That’s wrong, full-stop. You calculate (explicit) multiplication and division in one step, left to right. Reason being that division is technically just multiplying by the reciprocal.

    • Th0rgue@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      9 months ago

      Depends on the system you use. Most common system worldwide and in the academic circles (the oldest of the two) has 1 as the answer.