• nialv7@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    16 hours ago

    Precedences are just made up social constructs, don’t let the system restrict you, you can evaluate this expression however you want. Go wild.

  • ViperActual@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    14
    ·
    21 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.

  • Triasha@lemmy.world
    link
    fedilink
    English
    arrow-up
    73
    arrow-down
    1
    ·
    1 day ago

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

      • TheKingBee@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        11
        ·
        edit-2
        15 hours ago

        No, it’s written poorly to drive engagement. People read left to right and try to do math that way too, but if you want to be mean to people who don’t remember things they learned in elementary school then never applied in real life you write it like OP.

        (8-5)5+2

        Far easier for most people, but then you don’t get the arguments…

        • Tyro@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          6 hours ago

          Yes, thank you! Sure, it’d be great if people remembered arithmetic rules, but just write it better and it won’t matter.

    • AquaTofana@lemmy.world
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      1
      ·
      24 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.

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

        That’s the answer I arrived at as well, don’t feel so bad. I’m more of a writer than a calculator, though.

      • mfed1122@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        5
        ·
        15 hours ago

        This is absolutely not a problem of being bad with numbers. That’s like if I had trouble reading a Chinese sentence about gardening and said I’m just bad with plants. My issue is that I’m not familiar with the notation used to explain the concept - not a problem with the concept itself that the notation merely arbitrarily symbolizes.

        Being good or bad at math is not really an inherent thing, aside from some geniuses and some people with disabilities. If you want to be good at math, you can be!

      • borari@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        12
        ·
        23 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
      14
      ·
      21 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.

      • KubeRoot@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        4
        ·
        7 hours ago

        Arguably, there is no objective truth, since the symbols and rules of mathematics are assigned arbitrarily, and are basically a social contract, just like language!

        …Wait, that means there’s no objective meaning of “objective”, crap

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

          Well yeah take enough shrooms and everything is suddenly exposed as the artificial construct that it is. But we don’t have time to wake up and reinvent language every morning ;)

      • bountygiver [any]@lemmy.ml
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        16 hours ago

        ya this one is super unambiguously PEMDAS, the one that has more of an argument is the one with the division of whether a/b(c) is a / (b * c) or (a / b) * c

    • TigerAce@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      12
      arrow-down
      8
      ·
      1 day 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.

        • TigerAce@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          1
          ·
          13 hours ago

          Fix? It’s a duster fire. It may be hard to deal with, but a total collapse and completely rebuilding it feels like the better solution to the problem (so not based on a constitution made in completely different times with muskets and without internet etc).

          So you were taught math. What languages did you learn besides English? What history did you learn, just US or also of other countries and the rest of the world? And talking about the rest of the world, how much did you learn about that? Countries, cultures, cities, geographic features like mountains, seas, etc. and how they were formed? What religions were taught about? What about history of music and art?

        • banshee@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          19 hours ago

          In all fairness, I grew up in a small town in a very red state, but the education system there proved better than larger, more progressive parts of the state. The education I received was likely an outlier and not representative of the norm, but it did teach me that educators in an area do not necessarily mirror the rest of the population.

        • TigerAce@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          1
          ·
          14 hours ago

          My memory is shit, it was apparently 27 years ago if you’re right but I have no recollection to when it was. But it’s like cycling: it’s simple and once learned you never forget it.

          Now I’m learning how to weld. We’re learning Ohm’s law, which is the same as order of calculation: easy basic shit, a bit far in my memory but you never forget it. But others in my class are really struggling with it. I don’t get it.

          U = I R so R = U / I and I = U / R. P = U I so U = P / I and I = U / P. U=Volt, I=Ampère, R=Ω(Ohm), P=Watt

          This was first year in high school if I remember correctly.

        • banshee@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          19 hours 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.

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

    Hope some LISP can clear this up

    Edit:

    ( + 2 ( * 5 ( - 8 5 ) ) )
    
  • MattW03@lemmy.ca
    link
    fedilink
    English
    arrow-up
    11
    ·
    edit-2
    23 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.

  • jjjalljs@ttrpg.network
    link
    fedilink
    English
    arrow-up
    45
    ·
    1 day 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
      5
      ·
      22 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.

    • stray@pawb.social
      link
      fedilink
      English
      arrow-up
      16
      ·
      1 day 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
        ·
        1 day ago

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

    • merc@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      5
      ·
      23 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”.

    • Alaknár@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      11
      ·
      1 day ago

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

  • SSUPII@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    319
    arrow-down
    1
    ·
    2 days ago

    I feel like I am getting trolled

    Isn’t 17 the actual right answer?

    • marcos@lemmy.world
      link
      fedilink
      English
      arrow-up
      42
      arrow-down
      3
      ·
      1 day 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
        2
        ·
        19 hours 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

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

          Social conventions are real, well defined things. Some mathematicians like to pretend they aren’t, while using a truckload of them; that’s a hypocritical opinion.

          That’s not to say you can’t change them. But all of basic arithmetic is a social convention, you can redefine the numbers and operations any time you want too.

      • MotoAsh@piefed.social
        link
        fedilink
        English
        arrow-up
        9
        arrow-down
        2
        ·
        edit-2
        1 day 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.

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          English
          arrow-up
          8
          ·
          edit-2
          24 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

          • KubeRoot@discuss.tchncs.de
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            2
            ·
            7 hours 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.

          • MotoAsh@piefed.social
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            1
            ·
            1 day 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
                2
                ·
                21 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
                2
                ·
                edit-2
                21 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”.

        • orbitz@lemmy.ca
          link
          fedilink
          English
          arrow-up
          2
          ·
          20 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.

        • NewDark@lemmings.world
          link
          fedilink
          English
          arrow-up
          101
          arrow-down
          1
          ·
          2 days 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
            22
            ·
            1 day 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.

        • 0x0@lemmy.zip
          link
          fedilink
          English
          arrow-up
          1
          ·
          21 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.

      • SSUPII@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        24
        ·
        2 days 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
          3
          ·
          edit-2
          1 day 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.

          • lad@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            11 hours ago

            Treat a + b/c + d as a + b/(c + d) I can almost understand, I was guilty of doing that in school with multiplication, but auto-parenthesising the first part is really crazy take, imo

            • JackbyDev@programming.dev
              link
              fedilink
              English
              arrow-up
              6
              ·
              edit-2
              1 day 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
              5
              ·
              1 day 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
              4
              ·
              1 day 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

  • Truscape@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    88
    arrow-down
    1
    ·
    edit-2
    2 days ago

    Presuming PEMDAS is our order of operations and the 5 next to the parentheses indicates multiplication…

    2+5(8-5) -> 2+5(3) -> 2+15=17

    Other than adding a multiplication indicator next to the left parentheses for clarification (I believe it’s * for programming and text chat purposes, a miniature “x” or dot for pen and paper/traditional calculators), this seems fine, yeah.

    …I worry about how many people may not understand how to solve equations like these.

    • ftbd@feddit.org
      link
      fedilink
      English
      arrow-up
      38
      arrow-down
      2
      ·
      edit-2
      1 day ago

      That’s not even an equation, just basic arithmetic

      • Cethin@lemmy.zip
        link
        fedilink
        English
        arrow-up
        10
        ·
        1 day ago

        Technically not algebra, right? Algebra is where you move things around and solve for variables, and that kind of thing. This is just arithmetic.

      • Truscape@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        7
        arrow-down
        1
        ·
        1 day ago

        Fair enough, I’ve heard “math problem” and “math equation” used interchangeably.

        Also you would be surprised how many people do not know basic algebra, at least in the US rofl

        • upandatom@lemmy.world
          link
          fedilink
          English
          arrow-up
          9
          arrow-down
          5
          ·
          1 day ago

          You. You are one of them bc you do not know what an equation is.

          There is no algebra here. This is arithmetic.

          • Truscape@lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 day ago

            When I made my example, I used an algebraic expression, but yeah, the original question was arithmetic, sorry. Not very good at explaining things XD

    • Alaknár@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      1
      ·
      1 day ago

      Multiplication sign is not required in situations like this. Same with unknowns - you don’t have to write 2*x, you just write 2x.

    • TheRedSpade@lemmy.world
      link
      fedilink
      English
      arrow-up
      14
      ·
      edit-2
      2 days ago

      While I never failed a math class, I also never went past high school. When would your presumptions NOT be true?

      • Truscape@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        8
        arrow-down
        1
        ·
        edit-2
        2 days ago

        Some forms of programming syntax, although there are the fringe cases where an equation (or function in programming) is represented by a symbol in conjunction with a parentheses input.

        For example:

        y(x) = 2*x+3

        5+y(1) = 10, as 1 is substituted in for x in the prior equation.

        • TheBlackLounge@lemmy.zip
          link
          fedilink
          English
          arrow-up
          4
          ·
          2 days ago

          And in some languages a number can be used as a name of a variable or a function, so it can be anything really

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

            Not in most programming languages, though. You cannot start names with a number. Unless you’re using some strange character that merely looks like a number, anyways. Programming with unicode can get weird but generally works without issue these days.

        • moriquende@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 day ago

          Wouldn’t we just assume function expressions are always “in parenthesis”? Then it’s just a substitution and no rules were changed.

    • DarkCloud@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      24
      ·
      2 days ago

      I prefer BM-DAS, no one’s out here doing exponents, and no one calls brackets “parentheses”…

      • cobysev@lemmy.world
        link
        fedilink
        English
        arrow-up
        21
        ·
        2 days ago

        The way I was taught growing up, brackets are [these]. Parenthesis are (these).

        Yes, technically the latter are also brackets. But they can also be called parenthesis, whereas the former is exclusively a bracket. So we were taught to call them separate words to differentiate while doing equations.

        • Droggelbecher@lemmy.world
          link
          fedilink
          English
          arrow-up
          6
          ·
          1 day ago

          I’m a theoretical physics grad student and a night school maths teacher, I have never heard this distinction. People in academia around me call them round and square brackets.

          • tigeruppercut@lemmy.zip
            link
            fedilink
            English
            arrow-up
            8
            ·
            1 day ago

            It’s a US vs UK (and probably others) distinction. The ( ) are almost never called brackets in the US, unless it’s a regional thing I’m not aware of. Also the [ ] didn’t get used in any math classes I was in the US up through calculus except for matrices.

            • Droggelbecher@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              1 day ago

              Interesting! Nobody at my institute is a native English speaker. They’re from several European and some Asian and south American countries.

        • DarkCloud@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          1
          ·
          2 days ago

          Yeah, but as an adult it depends entirely on whether you’re in an industry or hobby that requires that level of bracket nuance/exponents.

          Most of us are just trying to remember the basics.

      • Deebster@infosec.pub
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 day ago

        I learnt it as BODMAS (brackets, orders, division and multiplication, addition and subtraction).

        Edit: I see we’re repeating points from the earlier posts down there 👇 (with default sort).