• NewDark@lemmings.world
          link
          fedilink
          English
          arrow-up
          98
          ·
          6 个月前

          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
            ·
            6 个月前

            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
          ·
          6 个月前

          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.

    • marcos@lemmy.world
      link
      fedilink
      English
      arrow-up
      42
      ·
      6 个月前

      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.

      • MotoAsh@piefed.socialBanned
        link
        fedilink
        English
        arrow-up
        11
        ·
        edit-2
        6 个月前

        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
          9
          ·
          edit-2
          6 个月前

          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.socialBanned
            link
            fedilink
            English
            arrow-up
            5
            ·
            6 个月前

            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.

              • MotoAsh@piefed.socialBanned
                link
                fedilink
                English
                arrow-up
                3
                ·
                edit-2
                6 个月前

                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”.

              • Quatlicopatlix@feddit.org
                link
                fedilink
                English
                arrow-up
                2
                ·
                6 个月前

                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

          • KubeRoot@discuss.tchncs.de
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 个月前

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

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

        • orbitz@lemmy.ca
          link
          fedilink
          English
          arrow-up
          2
          ·
          6 个月前

          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.

      • SkyeStarfall@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        3
        ·
        6 个月前

        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

        • I mean, arithmetic order is just convention

          Nope, rules arising from the definition of the operators in the first place.

          not a mathematical truth

          It most certainly is a mathematical truth!

          But that convention works in the way we know, yes, because that’s what’s… well… convention

          The mnemonics are conventions, the rules are rules

          • SkyeStarfall@lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 个月前

            The rules are socially agreed upon. They are not a mathematical truth. There is nothing about the order of multiple different operators in the definition of the operators themselves. An operator is simply just a function or mapping, and you can order those however you like. All that matters is just what calculation it is that you’re after

            • The rules are socially agreed upon

              Nope! Universal laws.

              They are not a mathematical truth.

              Yes they are! 😂

              There is nothing about the order of multiple different operators in the definition of the operators themselves

              That’s exactly where it is. 2x3 is defined as 2+2+2, therefore if you don’t do Multiplication before Addition you get wrong answers

              you can order those however you like.

              No you can’t! 😂 2+3x4=5x4=20, Oops! WRONG ANSWER 😂

              All that matters is just what calculation it is that you’re after

              And if you want the right answer then you have to obey the order of operations rules

              • SkyeStarfall@lemmy.blahaj.zone
                link
                fedilink
                English
                arrow-up
                1
                ·
                6 个月前

                That’s a very simplistic view of maths. It’s convention https://en.wikipedia.org/wiki/Order_of_operations

                Just because a definition of an operator contains another operator, does not require that operator to take precedence. As you pointed out, 2+3*4 could just as well be calculated to 5*4 and thus 20. There’s no mathematical contradiction there. Nothing broke. You just get a different answer. This is all perfectly in line with how maths work.

                You can think of operators as functions, in that case, you could rewrite 2+3*4 as add(2, mult(3, 4)), for typical convention. But it could just as well be mult(add(2, 3), 4), where addition takes precedence. Or, similarly, for 2*3+4, as add(mult(2, 3), 4) for typical convention, or mult(2, add(3, 4)), where addition takes precedence. And I hope you see how, in here, everything seems to work just fine, it just depends on how you rearrange things. This sort of functional breakdown of operators is much closer to mathematical reality, and our operators is just convention, to make it easier to read.

                Something in between would be requiring parentheses around every operator, to enforce order. Such as (2+(3*4)) or ((2+3)*4)

                • That’s a very simplistic view of maths

                  The Distributive Law and Arithmetic is very simple.

                  It’s convention

                  Nope, a literal Law. See screenshot

                  https://en.wikipedia.org/wiki/Order_of_operations

                  Isn’t a Maths textbook, and has many mistakes in it

                  Just because a definition of an operator contains another operator, does not require that operator to take precedence

                  Yes it does 😂

                  2+3x4=2+3+3+3+3=14 by definition of Multiplication

                  2+3x4=5x4=20 Oops! WRONG ANSWER 😂

                  As you pointed out, 2+34 could just as well be calculated to 54 and thus 20

                  No, I pointed out that it can’t be calculated like that, you get a wrong answer, and you get a wrong answer because 3x4=3+3+3+3 by definition

                  There’s no mathematical contradiction there

                  Just a wrong answer and a right one. If I have 1 2 litre bottle of milk, and 4 3 litre bottles of milk, even young kids know how to count up how many litres I have. Go ahead and ask them what the correct answer is 🙄

                  Nothing broke

                  You got a wrong answer when you broke the rules of Maths. Spoiler alert: I don’t have 20 litres of milk

                  You just get a different answer

                  A provably wrong answer 😂

                  This is all perfectly in line with how maths work

                  2+3x4=20 is not in line with how Maths works. 2+3+3+3+3 does not equal 20 😂

                  add(2, mult(3, 4)), for typical

                  rule

                  But it could just as well be mult(add(2, 3), 4), where addition takes precedence

                  And it gives you a wrong answer 🙄 I still don’t have 20 litres of milk

                  And I hope you see how, in here, everything seems to work just fine

                  No, I see quite clearly that I have 14 litres of milk, not 20 litres of milk. Even a young kid can count up and tell you that

                  it just depends on how you rearrange things

                  Correctly or not

                  our operators is just convention

                  The notation is, the rules aren’t

                  Something in between would be requiring parentheses around every operator, to enforce order

                  No it wouldn’t. You know we’ve only been using brackets in Maths for 300 years, right? Order of operations is much older than that

                  Such as (2+(3*4))

                  Which is exactly how they did it before we started using Brackets in Maths 😂 2+3x4=2+3+3+3+3=14, not complicated.

        • marcos@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 个月前

          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.

          • Social conventions are real, well defined things

            So are the laws of nature, that Maths arises from

            Some mathematicians like to pretend they aren’t, while using a truckload of them; that’s a hypocritical opinion

            No, you making false accusations against Mathematicians is a strawman

            That’s not to say you can’t change them

            You can change the conventions, you cannot change the rules

            But all of basic arithmetic is a social convention

            Nope, law of nature. Even several animals know how to count.

            you can redefine the numbers and operations any time you want too

            And you end up back where you started, since you can’t change the laws of nature

      • Some people insist there’s no “correct” order for the basic arithmetic operations.

        And those people are wrong

        And worse, some people insist the correct order is parenthesis first, then left to right

        As per Maths textbooks

        Both of those sets of people are wrong

        All Maths textbooks are wrong?? 😂

      • Petter1@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 个月前

        Well, this is just a writing standard that is globally agreed on,

        The writing rules are defined by humans not by natural force
        (That one thing and another thing are two things, is a rule from nature, as comparison)

        • this is just a writing standard that is globally agreed on

          No, it’s a universal rule of Maths

          The writing rules are defined by humans not by natural force

          Maths is for describing natural forces, and is subject to those laws

          That one thing and another thing are two things, is a rule from nature

          Yep, there are even some animals who understand that, and all of Maths is based upon it.

  • Truscape@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    89
    ·
    edit-2
    6 个月前

    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.

  • Triasha@lemmy.world
    link
    fedilink
    English
    arrow-up
    77
    ·
    6 个月前

    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
        7
        ·
        edit-2
        6 个月前

        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
          3
          ·
          6 个月前

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

        • Hawanja@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          6 个月前

          It’s written the same way literally thousands of math problems in thousands of textbooks have written the same type of math problem for the last 100 years. OP did not write it that way to be “mean.” He wrote it that way because it’s a legit way to write it.

          • TheKingBee@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 个月前

            The operational order is fucked, the way I rewrote is more readable, even if you remember the order. The only reason you’d write the equation like that is to be mean, there’s no reason to write it like that unless you’re trying to trip people up.

            • Hawanja@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              6 个月前

              You got it wrong on your first try, didn’t you? Lol, it’s not “mean” to write a math problem. The whole point of memorizing the order of operations is so that you can solve it no matter what order the equation is written in. No one wrote this problem on purpose just to make you fail to understand it, that’s dumb.

                • Hawanja@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  6 个月前

                  I just fail to see how you come to the conclusion that it was written in a “mean” way. It’s math, there is no “nice” way to write an equation.

        • No, it’s written poorly

          No it isn’t

          drive engagement

          The engagement comes from people not remembering the rules of Maths

          (8-5)5

          That’s an invalid syntax. it’s 5(8-5) or 5x(8-5), nothing else. Why is it invalid? Imagine (8-5)-5 - am I multiplying what’s in the brackets by -5 (which gives -15), or subtracting 5 after doing the brackets (which gives -2)? Invalid syntax

          Far easier for most people

          Nope, it’s wrong for everyone, due to being an invalid syntax.

    • AquaTofana@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      ·
      6 个月前

      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.

      • mfed1122@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        6
        ·
        6 个月前

        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!

      • Rcklsabndn@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 个月前

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

      • BCsven@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 个月前

        Its order of operations, to get rid of brackets do the internal, then the 5 tells you there was 5 sets of the amount in brackets. Rather than 2+5 first.

      • Triasha@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 个月前

        If you don’t remember pemdas, you can use the longer P.lease E.xcuse M.y D.ear A.unt S.ally.

  • jjjalljs@ttrpg.network
    link
    fedilink
    English
    arrow-up
    43
    ·
    6 个月前

    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.

    • Alaknár@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      10
      ·
      6 个月前

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

    • Quatlicopatlix@feddit.org
      link
      fedilink
      English
      arrow-up
      5
      ·
      6 个月前

      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
      5
      ·
      6 个月前

      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”.

    • so it would be clearer

      That’s because it’s already clear as is, as per the rules of Maths.

      I think someone told me that order of operations is like a natural law

      It’s a natural consequence of the definitions of the operators. e.g. Multiplication is shorthand for repeated Addition - 2x3=2+2+2 - so if you don’t do it before addition you end up with wrong answers. The order of operations rules is in fact just breaking everything down into Addition and Subtraction and then solving from there.

      not a convention

      There are some conventions, like left to right, but in that case that’s only because students tend to make mistakes with signs when they don’t go from left to right, so it’s there to preserve teachers sanity.

      • jjjalljs@ttrpg.network
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 个月前

        That’s because it’s already clear as is, as per the rules of Maths.

        More people evaluate 2+3x4 incorrectly than 2+(3x4). So, no, your answer does not hold up to my observed reality. You can throw as many “well technically” and “well actually” as you want, but that’s not going to fix the bug or make a pr.

        • More people evaluate 2+3x4 incorrectly than 2+(3x4)

          The people who have forgotten the rules of Maths, and the mnemonics even! 😂

          So, no, your answer does not hold up to my observed reality

          So try observing a real Maths textbook then. Students have no trouble at all with this, only adults who’ve forgotten the rules.

          • jjjalljs@ttrpg.network
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 个月前

            Adults who have forgotten the rules who I work with and read/write code where it’s important. In the real world.

            This is like some pure maths vs real life engineering cliché.

            You’re either being deliberately obtuse or you’re painfully naive.

            • Adults who have forgotten the rules who I work with and read/write code where it’s important

              And as a consequence of that, MathGPT is the only e-calc which gives correct answers to order of operations! 😂

              This is like some pure maths vs real life engineering cliché

              It’s a Correct Maths vs. Programmers who have forgotten the rules cliche

              You’re either being deliberately obtuse or you’re painfully naive

              Neither, I’m a Maths teacher

              • jjjalljs@ttrpg.network
                link
                fedilink
                English
                arrow-up
                1
                ·
                6 个月前

                I like and respect teachers, but I’m a software developer and I’m telling you that adding extra parenthesis often adds clarity and makes the whole process smoother. You exist in a whole other context that has norms and assumptions that do not apply to what I’m talking about.

                You being technically correct is irrelevant.

                • I’m a software developer

                  So am I

                  adding extra parenthesis often adds clarity

                  Everyone I’ve seen add Brackets to it has done so in the WRONG place and given WRONG answers. Again this is an issue of programmers not checking the rules of Maths

                  that do not apply to what I’m talking about

                  The rules of Maths always apply to all Maths

          • Alaknár@sopuli.xyz
            link
            fedilink
            English
            arrow-up
            4
            ·
            6 个月前

            Division, Multiplication, Addition, and Subtraction

            This is fucking so many people over… It should be limited - like Orders - to only Multiplication and Addition.

            Because division is the same operation as multiplication, and subtraction is the same operation as addition, and they have the same “weight” in the order of operations (meaning, you do them left-to-right).

            • It should be limited - like Orders - to only Multiplication and Addition

              Because you don’t want people to know when to do Division and Subtraction? 😂

              Because division is the same operation as multiplication

              No it isn’t, but they are both binary operators.

              they have the same “weight” in the order of operations (meaning, you do them left-to-right)

              And where are they going to do Division and Subtraction in the left to right if you’ve left them out? 🙄

              • Alaknár@sopuli.xyz
                link
                fedilink
                English
                arrow-up
                2
                ·
                6 个月前

                Because you don’t want people to know when to do Division and Subtraction? 😂

                Because division is multiplication, and subtraction is addition.

                No it isn’t, but they are both binary operators.

                2/2 is the same as 2*½

                2-2 is the same as 2+(-2)

                And where are they going to do Division and Subtraction in the left to right if you’ve left them out? 🙄

                Well, as I already said multiple times: Division = Multiplication and Subtraction = Addition, therefore they would be doing them together, left to right. As in: 9-3+2 would not confuse anyone who learned “Addition → Subtraction”, as it does right now.

                • Because division is multiplication

                  No it isn’t.

                  and subtraction is addition

                  And you still have to do both

                  2/2 is the same as 2*½

                  They’re equal in value, they’re not the same

                  2-2 is the same as 2+(-2)

                  You got that the wrong way around. Brackets have only been used in Maths for a few centuries now

                  Well, as I already said multiple times: Division = Multiplication

                  And you were wrong every time you said it.

                  therefore they would be doing them together

                  Not if you left them out of the mnemonic and they didn’t know when to do them

      • sbeak@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        3
        ·
        6 个月前

        I learned BODMAS too! It seems BIDMAS is another one (British I think), PEMDAS is the weird American one, BEDMAS is a thing too. You’re able to vary the first letter (parenthesis or brackets), second letter (indices/exponent/“order” or “operation”), and the order of multiplication/division (MS or SM) and addition/SUBTRACTION (AD or DA)

        Very interesting indeed.

    • anamethatisnt@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      9
      ·
      6 个月前

      I never ran into PEMDAS while growing up, in Sweden I’ve always been taught of it as the following order of operations:

      1. P
      2. E & Roots
      3. M & D
      4. A & S
      • Truscape@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        13
        ·
        6 个月前

        Technically roots are a form of exponent, just fractional (square root is power of 1/2, for instance). I can see how it could be easier to conceptualize when you break it down like that though. Neat to see the differences compared to the US breakdown :)

  • nialv7@lemmy.world
    link
    fedilink
    English
    arrow-up
    25
    ·
    6 个月前

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

  • vala@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    22
    ·
    edit-2
    6 个月前
    (* (+ 2 5) (- 8 5))
    

    Hope some LISP can clear this up

    Edit:

    ( + 2 ( * 5 ( - 8 5 ) ) )
    
    • beneeney@lemmy.zip
      link
      fedilink
      English
      arrow-up
      28
      ·
      6 个月前

      Aunt Sally said some racist things at Thanksgiving, I’m tired of excusing her smh

    • callouscomic@lemmy.zip
      link
      fedilink
      English
      arrow-up
      12
      ·
      6 个月前

      I’ll never understand these approaches to learning. They require remembering the phrase, and then require remembering how the phrase translates to the rules you need to remember.

      I’ll just remember the rules in the first place. Less effort.

      • tigeruppercut@lemmy.zip
        link
        fedilink
        English
        arrow-up
        18
        ·
        6 个月前

        There’s just no way rote learning is easier than mnemonics unless you have a photographic memory.

        Shit, I still remember the order of taxonomic ranks after seeing the phrase “King Phillip came over from Germany stoned” written in a used bio textbook 30 years ago when we never even made it to that chapter to officially study in class. I guarantee I never would’ve remembered the list “kingdom phylum class order family genus species”.

        • dankm@lemmy.ca
          link
          fedilink
          English
          arrow-up
          3
          ·
          6 个月前

          Warning: my music nerd’s about to come out.

          I’m in my 40s, and have been playing music since single digits. I still remember the order of lines in the staffs with “Every Good Boy Deserves Fudge”, “FACE”, “Good Boys Deserve Fudge Always”, and “All Cows Eat Grass”. I did teach my kids “Good Burritos Don’t Fall Apart”, though, since they seem to like burritos.

          My internal math nerd agrees with the grandparent though, for some reason I just remembered the order of operations and was confused when my kids came home with PEDMAS. But to be fair, I use the order of operations every day at work, so 🤷. I’m also one of those people who will insist on using parentheses everywhere there’s more than two terms, though, so take from that what you will.

      • IcyToes@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 个月前

        Yeah, but there is more to remember. I remember BODMAS and if I forget the rules, I work it out and apply it.

      • I’ll never understand these approaches to learning. They require remembering the phrase, and then require remembering how the phrase translates to the rules you need to remember

        Yeah, exactly, but the U.S. seems to have a chip on it’s shoulder about always doing everything differently to the whole rest of the world. “Maths? We’re not going to use BEDMAS, and we’re not going to call them Brackets, and…”.

  • Digit@lemmy.wtf
    link
    fedilink
    English
    arrow-up
    20
    ·
    edit-2
    6 个月前

    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)]

    • A_Chilean_Cyborg@feddit.cl
      link
      fedilink
      English
      arrow-up
      21
      ·
      6 个月前

      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
        ·
        6 个月前

        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

        • You don’t necessarily have to do parentheses first

          Yes, you do necessarily have to do it first

          What matters is that the things inside the parentheses are a group that you can’t break apart

          And outside, and you must do them first. You haven’t finished Brackets until you have 5(8-5)=15.

          10÷2+3-2*(2+1) you can do the division first

          only because you’ve separated that part with a plus sign

    • Nils@lemmy.ca
      link
      fedilink
      English
      arrow-up
      11
      ·
      6 个月前

      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)?

      • potoooooooo 🥔@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        6 个月前

        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.

  • MrSmith@lemmy.world
    link
    fedilink
    English
    arrow-up
    20
    ·
    6 个月前

    To all the people yelling PEMDAS and BOMBDAS or whatever - languages other than English exist.