- 1 + 1 + 1 + 1 - 1 + 1 + 1 * 0
- 3 + 3 * 3 - 3 + 3
- 3 + 3 / 3 + 3

or this

3 * 3 - 3 * 0

-----------------

3 + 3

List goes on. I cringe because there are tons of people getting it wrong. ---___---

]]>It's not helped by the fact that 99% of non-scientific calculators don't take the order into account either and would therefore give the wrong answer on those problems if they're typed as-is.

]]>*Operator precedence* works nicely:

36 minutes ago, Bas wrote

Everybody sucks at something.

I have a couple of strengths that I have managed to capitalize on over the years, but I am well aware that I suck at *way* more things than I'm good (or at least passable) at.

]]>And for "it's not something most people actually need very often", I'd think it's the natural calculation sequence on your purchase reciept, just not many people who try to make connection from that daily fact. Once you make that connection you will remember it easily.

]]>**M**achtsverheffen (powers)**V**ermenigvuldigen (multiplication)**D**elen (division)**W**orteltrekken (roots)**O**ptellen (addition)**A**ftrekken (subtraction)

I stopped relying on mnemonics since I almost flunked a test for misremembering one.

Just curious, though: why should roots be computed after division?

]]>Not that I've ever seen an root without explicit precedence (without the top horizontal line) in the wild, so it's hardly a real problem.

According to the Dutch Wikipedia page on operator precedence, certain math textbooks maintained the old order (with upper line-less roots having lower precedence than multiplication/division) until the end of the 20th century. I guess the textbook that I used did so too, because I definitely remember being taught that mnemonic.

]]>

oh, wrong class

]]>Music theory mnemonics are a close second. There are so many of them, many of them sharing the same words in a different order, that it's as hard to remember which mnemonic to use when as it is to just remember what they stand for. Especially the Dutch ones all seem to revolve about feeding monkeys.

]]>First 12 digits of PI. It's the only math related one I remember.

]]>Priorities...

]]>Good old BODMAS:

**B**rackets

Power **O**f**D**ivision**M**ultiplication**A**ddition**S**ubtraction

Tbh, though, I think the whole thing is silly. If it's not immediately obvious what the order is, use brackets. Brackets are free, and readable code/math is always better than "clever" code or math.

]]>]]>1 minute ago, Sven Groot wrote

I don't know the first 12 digits of Pi, but I do know 0118 999 881 999 119 725...3 by heart.

Priorities...

5+5+4+4+5+5+5-5+5=?

And then this is labeled an IQ test. Wow.

]]>1 hour ago, magicalclick wrote

@evildictaitor: I dislike those things. People start to say add before subtract because those things. I am like, dude, addition and subtraction has the same order.

But + and - commute, so it doesn't matter :/

]]>3 hours ago, cbae wrote

@Blue Ink: Kind people come over for good spaghetti. Anybody remember that one?

I like xkcd's new proposal better.

]]>10-3+2=5 if you add before subtract, but should be 9.

(Example stolen from Wikipedia)

]]>17 hours ago, Sven Groot wrote

Lots of people just don't remember the operator order, which is hardly surprising since it's not something most people actually need very often.

Yea but everyone learns it in school, and its pretty intuitive, meaning its not hard to forget. So I still don't get it.

]]>9 hours ago, magicalclick wrote

@evildictaitor: I dislike those things. People start to say add before subtract because those things. I am like, dude, addition and subtraction has the same order.

When operators have the same precedence we associate, i.e., left to right association in case of + and - operators

]]>All of us would get each of the examples in this thread wrong at some point in time -> the points in time when we didn't know anything about order precedence of mathematical operations.

Here's to ignorance and the pursuit of knowledge. You can't have one without the other.

C

]]>1 hour ago, Charles wrote

It's not necessarily about getting it

right. When you get something wrong you inevitably learn why. Then, you acquire new knowledge that stays with you.All of us would get each of the examples in this thread wrong at some point in time -> the points in time when we didn't know anything about order precedence of mathematical operations.

Here's to ignorance and the pursuit of knowledge. You can't have one without the other.C

Well Put!

Another way to think about it is terms of a state machine.

We can get from a state of 1."Not Knowing" to a state of 2."Knowing" (here state of knowing may not be absolute) with multiple iterations.

And the transition from state 1 to 2 can be learning/experience/observation/accidental.

]]>2 hours ago, brian.shapiro wrote

*snip*

Yea but everyone learns it in school, and its pretty intuitive, meaning its not hard to forget. So I still don't get it.

Yeah, and I learned in school which French verbs should be conjugated with être rather than avez, and I'm sure that to people who actually use French regularly that's perfectly intuitive and easy to remember. Yet I never use this in my daily life, so I've completely forgotten them all.

And I can't think of any instance outside of my work where knowing about operator precedence was actually necessary.

]]>Thanks for the good laugh... my teammates just looked at me as if I had gone crazy.

]]>3 hours ago, Charles wrote

It's not necessarily about getting it

right. When you get something wrong you inevitably learn why. Then, you acquire new knowledge that stays with you.All of us would get each of the examples in this thread wrong at some point in time -> the points in time when we didn't know anything about order precedence of mathematical operations.

Here's to ignorance and the pursuit of knowledge. You can't have one without the other.C

I don't have problem for people getting it wrong, but have problem where the teachers teach it without explaining the fundamential reason of doing so.

Once you know the reason, even if you forgot the order, you can deduce it correctly yourself. It's all related to converting goods to their monetary value. "M"oney is the basis of ancient "M"athematics.

]]>I graduated, with honors, in 1978. I learned Calculus, or perhaps I should say studied it a couple of years later when I went to university. However, it wasn't until about 10 years ago that I began studying Calculus, and studied it intensely, daily, for 6 years or so (with a few excursions between cover to cover studies of my 1,000 page calculus book, to read a 1,000 page physics book and a strength of materials book)

This calculus study was sparked by my need to understand the topic of "The Finite Element Method". After studying said topic for 2 months, still nothing of what I studied made any sense. The appendix of vectors and matrixes, a fundamental topic for studying FEM, was the last straw that "forced" me to finally study the calculus. It has changed my world.

Question to C9ers: Is calculus mentioned in high school today?

]]>10 hours ago, cheong wrote

*snip*

I don't have problem for people getting it wrong, but have problem where the teachers teach it without explaining the fundamential reason of doing so.

Once you know the reason, even if you forgot the order, you can deduce it correctly yourself. It's all related to converting goods to their monetary value. "M"oney is the basis of ancient "M"athematics.

The problem is that operator precedence is largely a convention; there's no real reason why 3 + 3 * 4 = 15 and not 24; it's just that we decided it has to be that way.

That's what makes it hard to teach: you can paraphrase it all you want, but the answer is essentially "just because" and that never flies too well with kids.

]]>1 minute ago, Blue Ink wrote

*snip*

The problem is that operator precedence is largely a convention; there's no real reason why 3 + 3 * 4 = 15 and not 24; it's just that we decided it has to be that way.

That's what makes it hard to teach: you can paraphrase it all you want, but the answer is essentially "just because" and that never flies too well with kids.

Sure there's a reason. If the operators applied based on order in the equation, then the operations couldn't be freely associated with each other and always would have to be put in place in a certain order. For example, lets say you had an equation x × 2 = y × 3. You want to be able to rewrite the equation as x × 2 - y × 3 = 0 and still have it mean the same thing without putting in parentheses. If it was based on the order in the equation you couldn't do that very well. Stacking operations isn't very intuitive for people, only useful for calculators that can only enter one operation at a time. And if you had addition/subtraction taking precedence before multiplication/division you would have something that was intuitively strange, too.

Its not absolutely necessary, of course, but there's a reason behind it; its not arbitrary that standard order of operations works like that.

]]>3 hours ago, Proton2 wrote

Question to C9ers: Is calculus mentioned in high school today?

Yup. Though, our sequence was geometry, algebra II, precalc, calc. Math during senior year was optional, so the majority of students opted out of calc.

On a separate topic, I really don't like the typical high school math sequence. Focuses on the wrong areas imo, which could put people off who would have otherwise enjoyed a college math major. Too much equation solving and not enough mathematical/computational thinking.

]]>20 minutes ago, kettch wrote

@Blue Ink: Mathematics were more "discovered" than "made" so there are a lot of things that are arbitrary because that's just the way it is.

That discussion is an entire area of philosophy. And there are certainly big names and good arguments on both sides of that discussion

nope. You have to box the object since you are moving the entire box, not individual items. Telling someone to move box of toys, or take toys out and move them, are completely different things, as the box is gone and the toys do not have the same relative displacement anymore. It is the same as you pass in a student object pointer or pass in individual student attributes in the parameters. They are very different and is no brainer to programmers.]]>48 minutes ago, brian.shapiro wrote

*snip*Sure there's a reason. If the operators applied based on order in the equation, then the operations couldn't be freely associated with each other and always would have to be put in place in a certain order. For example, lets say you had an equation x × 2 = y × 3. You want to be able to rewrite the equation as x × 2 - y × 3 = 0 and still have it mean the same thing without putting in parentheses. If it was based on the order in the equation you couldn't do that very well. Stacking operations isn't very intuitive for people, only useful for calculators that can only enter one operation at a time. And if you had addition/subtraction taking precedence before multiplication/division you would have something that was intuitively strange, too.

Its not absolutely necessary, of course, but there's a reason behind it; its not arbitrary that standard order of operations works like that.

31 minutes ago, brian.shapiro wrote

Its not absolutely necessary, of course, but there's a reason behind it; its not arbitrary that

standardorder of operations works like that.

But it's only reasonable in the context of the **standard** interpretation of math in which we have mathematical phrases that try to map to our spoken expressions ("He is twice as tall as she, but she is three times as tall as someone else"). The interpretation tells us all the possible valid phrases there are out there, which places constraints on the syntax construction. Take another interpretation (possibly less complete), and the rules for writing syntax changes. You could very well start at the syntax with no knowledge of the interpretation you're using (or that there even exists a standard interpretation) and then become confused why you must do things a certain way.

But this is just true in general when told to memorize facts and processes - without context, you have nothing to really attach to and you just become a slave to prescribed facts, incapable of generating your own extensions to ideas.

]]>I think they should teach basic proof technique (direct/contradiction) and use that as a backdrop to many of the major topics. Then, it becomes obvious where all these facts students typically take for granted come from.

]]>19 minutes ago, MasterPie wrote

I think they should teach basic proof technique (direct/contradiction) and use that as a backdrop to many of the major topics. Then, it becomes obvious where all these facts students typically take for granted come from.

Like how the biggest prime is 2,147,483,647

Proof by contradiction:

Suppose X is a prime larger than 2,147,483,647

Contradiction: there are no numbers larger than 2,147,483,647

QED.

]]>36 minutes ago, magicalclick wrote

*snip*nope. You have to box the object since you are moving the entire box, not individual items. Telling someone to move box of toys, or take toys out and move them, are completely different things, as the box is gone and the toys do not have the same relative displacement anymore. It is the same as you pass in a student object pointer or pass in individual student attributes in the parameters. They are very different and is no brainer to programmers.

Yea, but the alternative is an order of operations which is difficult to use in practice. So some type of "boxing" order of operations is preserved, higher order mathematical functions are given first priority, and the "boxing" is in your head. I never said it was necessary, just that it wasn't arbitrary, and its not arbitrary.

The standard order of operations also prevents a left-to-right "stacking" of the operations and allows you to do it from either direction.

So lets say someone knows nothing of math and sees an equation and doesn't get what to do. I understand the problem. But if you take one or two math courses, the *choice* for the standard order of operations should seem intuitive, and not something easy to forget.