• ViperActual@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 hours ago

    2+5(8-5)

    For anyone wanting to see a different way of solving it with distribution:

    2+58-55 2+40-25 42-25 17

    So long as you follow the basic math rules, you can solve it in many different ways to get the same result.

  • cmhe@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    48 minutes ago

    I don’t get why these kind of post crop up so often.

    The answer to them doesn’t matter and these aren’t really math questions, because there is no context given. This is just endless discussions about different people having different assumptions on notation used there…

    In real math, where the numbers mean something, good and consistent notation is important, but not necessary, because the order of operations or what those operations are exactly would be clear through the context of these formulas. Good notation just makes it easier to spot errors, work with formulas or to avoid confusion.

    Here is what I would assume this formula could mean. Someone has 2 apples and 5 bags of apples that initially came with 8 apples each inside, but someone else ate 5 apples from each of these bags.

    With this context it is pretty clear what the answer would be.

  • MattW03@lemmy.ca
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    4 hours ago

    Let’s keep it easy. There’s 2 + all the other number who results in 15 = 17.

    Someone may mistake by doing 2+5 then the rest of the operation, resulting in 21. But is wrong.

  • vala@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    10
    ·
    edit-2
    4 hours ago
    (* (+ 2 5) (- 8 5))
    

    Hope some LISP can clear this up

    Edit:

    ( + 2 ( * 5 ( - 8 5 ) ) )
    
  • Triasha@lemmy.world
    link
    fedilink
    English
    arrow-up
    60
    ·
    9 hours ago

    Pemdas, parenthesis first, for a total of 3. Then multiplication, 15, then addition. 17. What’s hard about this?

    • AquaTofana@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      5 hours ago

      I fucking suck at math and totally just re-proved it to myself with this problem lmao.

      It didn’t make sense to me to multiply the 3 & the 5 with zero consideration for the “2”. I have ALWAYS struggled with the steps to solve these types of equations.

      So the answer I got was 21. Some of us are just bad with numbers, I s’pose.

      • borari@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        7
        ·
        4 hours ago

        The numbers in the equation and their totals are completely irrelevant to the order you perform the operations.

        I don’t think it’s an issue of “being bad with numbers”, I think the issue is not understanding the logic or being able to understand the bottom up type of thinking or something.

    • BanMe@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      3 hours ago

      It became a meme a few years ago, people would post problems like this and argue about whose was right, as if there were no objective truth. It hurt to watch.

    • TigerAce@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      12
      arrow-down
      7
      ·
      6 hours ago

      In the rest of the world: yes.

      In the US: I highly doubt it.

      This is just basic math, if you can’t figure this out you’re probably 8 years old.

        • banshee@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          12 minutes ago

          Thanks for confirming. I probably sounded too condescending but I wasn’t sure if it was a false memory.

          I loved math as a kid though, so I ran through the curriculum as fast as I could to get to the good stuff. I think having older siblings helped - it gave me a preview of more interesting material.

  • 🇰 🌀 🇱 🇦 🇳 🇦 🇰 🇮 @pawb.social
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    14
    ·
    edit-2
    3 hours ago

    2+5 is 8, 8-5 is 3. 8×3 is 24.

    But I also haven’t done this kind of math since 4th grade so I’m not sure if the joke is that this is the real answer or the answer you get doing it wrong… 🤔

  • jjjalljs@ttrpg.network
    link
    fedilink
    English
    arrow-up
    42
    ·
    12 hours ago

    I got some people really angry at me when I suggested writing some math expression with parenthesis so it would be clearer. I think someone told me that order of operations is like a natural law and not a convention, and thus everyone should know it or be able to figure it out.

    • Quatlicopatlix@feddit.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 hours ago

      Using parenthesis can really help if you want to simplify a term or need to rewrite something. I do that all the time because a lot of times you then can just cross stuff out fast on equations or get a common term that just has some factor instead of having a convolutet equation.

    • merc@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 hours ago

      I got really angry because the prettier code formatter insists on removing parentheses, making things less clear. Because it’s an “opinionated” formatter you can’t tell it not to do that without using ugly hacks.

      Sure, logically there are times when you don’t need them. But, often it helps to explain what’s happening in the code when you can use parentheses to group certain things. It helps in particular when you want to use “&&” and “||” to say “do X only if Y fails”.

    • stray@pawb.social
      link
      fedilink
      English
      arrow-up
      13
      ·
      9 hours ago

      I sometimes like to add unnecessary parentheses or brackets to section things off and improve legibility, but I don’t do any math stuff collaboratively, so I have no idea whether others would find that disruptive or helpful.

      • Feathercrown@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        9 hours ago

        I do this, sometimes it helps reveal a natural pattern when some parts of earlier terms have “disappeared” to simplification

    • Alaknár@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      10
      ·
      9 hours ago

      I mean, there are very few ambiguous cases when you know how the order of operations works.

  • Digit@lemmy.wtf
    link
    fedilink
    English
    arrow-up
    17
    arrow-down
    3
    ·
    edit-2
    10 hours ago

    Hrmm.

    I read that as resulting in 21.

    My education system did fail me.

    I plugged that into ghci as 2+5*(8-5), and it says 17.

    :(

    I did (2+5)*(8-5).

    Doh.

    [Edit: (Double doh! Mistyped that here as 5+2. XD)]

      • potoooooooo ☑️@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        8
        ·
        7 hours ago

        Well, it used to be a free country until common core and now this nonsense is the result. Numbers and punctuation mixed together. Pure chaos.

    • A_Chilean_Cyborg@feddit.cl
      link
      fedilink
      English
      arrow-up
      22
      arrow-down
      1
      ·
      12 hours ago

      You do parenthesis first and then multiplications and then sums, you did parenthesis, then sums, then multiplications, wich is wrong.

      • merc@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 hours ago

        You don’t necessarily have to do parentheses first. What matters is that the things inside the parentheses are a group that you can’t break apart. If you have 10÷2+3-2*(2+1) you can do the division first 5+3-2*(2+1) then the addition outside the parentheses 8-2*(2+1) It’s just that before you do the multiplication of the term outside the parentheses, you have to handle the parentheses group, so you get 8-2*3 -> 8-6 -> 2

    • Nils@lemmy.ca
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      1
      ·
      12 hours ago

      plugged that into ghci as 5+2*(8-5), and it says 17.

      You might want to report that error. Or, did you mean 2+5*(8-5)?

  • SSUPII@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    287
    arrow-down
    1
    ·
    21 hours ago

    I feel like I am getting trolled

    Isn’t 17 the actual right answer?

    • marcos@lemmy.world
      link
      fedilink
      English
      arrow-up
      36
      arrow-down
      3
      ·
      13 hours ago

      Some people insist there’s no “correct” order for the basic arithmetic operations. And worse, some people insist the correct order is parenthesis first, then left to right.

      Both of those sets of people are wrong.

      • SkyeStarfall@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 minutes ago

        I mean, arithmetic order is just convention, not a mathematical truth. But that convention works in the way we know, yes, because that’s what’s… well… convention

      • MotoAsh@piefed.social
        link
        fedilink
        English
        arrow-up
        8
        arrow-down
        2
        ·
        edit-2
        9 hours ago

        Hopefully you can see where their confusion might come from, though. PEMDAS is more P-E-MD-AS. If you have a bunch of unparenthesized addition and subtraction, left to right is correct. A lot of like, firstgrader math problems are just basic problems that are usually left to right (but should have some extras to highlight PEMDAS somewhere I’d hope).

        So they’re mostly telling you they only remember as much math as a small child that barely passed math exercizes.

        • orbitz@lemmy.ca
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 hours ago

          Huh I just remembered the orders of arithmetic but parentheses trump all so do them first (I use them in even the calculator app). Mean I assume that’s that that says but never learned that acronym is all. Now figuring out categories of words;really does my noodle in sometimes. Cause some words can be either depending on context. Math when it’s written out has (mostly) the same answer. I say mostly because somewhere in the back of my brain there are some scenarios where something more complicated than straight arithmetic can come out oddly but written as such should come out the same.

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          English
          arrow-up
          7
          ·
          edit-2
          5 hours ago

          If you have a bunch of unparenthesized addition and subtraction, left to right is correct

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

          1 + 2 + 3 = 3 + 2 + 1

          • MotoAsh@piefed.social
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            1
            ·
            5 hours ago

            True, but as with many things, something has to be the rule for processing it. For many teachers as I’ve heard, order of appearance is ‘the rule’ when commutative properties apply. … at least until algebra demands simplification, but that’s a different topic.

              • Quatlicopatlix@feddit.org
                link
                fedilink
                English
                arrow-up
                1
                ·
                3 hours ago

                Yes thank you! If you have a sum it is really great to order it in a way that makes it better to ad in your head and i think that lots of people do that without thinking about it. X=2+3+1+6+2+4+7+5 X=2+3+5+4+6+7+1+2 X=5+5 + 10 +7+1+2 X=10 + 10 + 7+3 X=10 + 10 + 10

              • MotoAsh@piefed.social
                link
                fedilink
                English
                arrow-up
                1
                ·
                edit-2
                3 hours ago

                No, you completely misunderstood my point. My point is not to describe all valid interpretations of the commutative property, but the one most slow kids will hear.

                OFC the actual rule is the order doesn’t matter, but kids that don’t pick up on the nuance of the commutative property will still remember, “order of appearance is fine”.

        • 0x0@lemmy.zip
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 hours ago

          More like a sad realization of the state of (un)education in some parts of the so-called civilized world.
          You laugh not to cry.

        • NewDark@lemmings.world
          link
          fedilink
          English
          arrow-up
          88
          arrow-down
          1
          ·
          19 hours ago

          I think it’s meant to play with your expectations. Normally someone’s take being posted is to show them being confidently stupid, otherwise it isn’t as interesting and doesn’t go viral.However, because we’re primed to view it from that lens, we feel crazy to think we’re doing the math correctly and getting the “wrong answer” from what we assume is the “confident dipshit”.

          There’s layers beyond the superficial.

          • namingthingsiseasy@programming.dev
            link
            fedilink
            English
            arrow-up
            17
            ·
            15 hours ago

            I fell for it. It’s crazy to think how heavily I’ve been trained to believe everything I see is wrong in the most embarrassing and laughable way possible. That’s pretty depressing if you think about it.

      • SSUPII@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        23
        ·
        19 hours ago

        Yeah I know that. But I was feeling confused as to why it was here. That’s why I was feeling trolled, because it made me doubt basic math for being posted in a memes community.

        • JackbyDev@programming.dev
          link
          fedilink
          English
          arrow-up
          10
          arrow-down
          2
          ·
          edit-2
          10 hours ago

          They did the joke wrong. To do it right you need to use the ÷ symbol. Because people never use that after they learn fractions, people treat things like a + b ÷ c + d as

          a + b
          -----
          c + d
          

          Or (a + b) ÷ (c + d) when they should be treating it as a + (b ÷ c) + d.

          That’s the most common one of these “troll math” tricks. Because notating as

          a + b + d
              -
              c
          

          Is much more common and useful. So people get used to grouping everything around the division operator as if they’re in parentheses.

            • JackbyDev@programming.dev
              link
              fedilink
              English
              arrow-up
              5
              ·
              edit-2
              8 hours ago

              Now that’s a good troll math thing because it gets really deep into the weeds of mathematical notation. There isn’t one true order of operations that is objectively correct, and on top of that, that’s hardly the way most people would write that. As in, if you wrote that by hand, you wouldn’t use the / symbol. You’d either use ÷ or a proper fraction.

              It’s a good candidate for nerd sniping.

              Personally, I’d call that 36 as written given the context you’re saying it in, instead of calling it 1. But I’d say it’s ambiguous and you should notate in a way to avoid ambiguities. Especially if you’re in the camp of multiplication like a(b) being different from ab and/or a × b.

            • MotoAsh@piefed.social
              link
              fedilink
              English
              arrow-up
              3
              ·
              9 hours ago

              Well, now you might be running into syntax issues instead of PEMDAS issues depending on what they’re confused about. If it’s 12 over 2*6, it’s 1. If it’s 12 ÷ 2 x 6, it’s 36.

              A lot of people try a bunch of funky stuff to represent fractions in text form (like mixing spaces and no spaces) when they should just be treating it like a programmer has to, and use parenthesis if it’s a complex fraction in basic text form.

            • Feathercrown@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              9 hours ago

              The P in PEMDAS means to solve everything within parentheses first; there is no “distribution” step or rule that says multiplying without a visible operator other than parentheses comes first. So yes, 36 is valid here. It’s mostly because PEMDAS never shows up in the same context as this sort of multiplication or large fractions