6÷2(1+2)

zeta.one/viral-math/

I wrote a (very long) blog post about those viral math problems and am looking for feedback, especially from people who are not convinced that the problem is ambiguous.

It’s about a 30min read so thank you in advance if you really take the time to read it, but I think it’s worth it if you joined such discussions in the past, but I’m probably biased because I wrote it :)

Alcatorda,

Hi! Nice blog post. Since you asked for feedback I’ll point out the one thing I didn’t really understand. You explain the difference between the calculators by showing excerpts from the manuals and you highlight that in the first manual, implicit multiplication is prioritised. But the text you underlined only refers to implicit multiplication involving special expressions(?) like pi, e, sqrt or log, and nothing about “regular” implicit multiplication like 2(1+3). So while your photos of the calculator results are great proof that the two models use a different order of operations, to me the manuals were a bit confusing since they did not actually seem to prove your point for the example math problems you are discussing. Or maybe I missed something?

wischi,

You are right the manual isn’t very clear here. My guess is that parentheses are also considered Type B functions. I actually chose those calculators because I have them here and can test things and because they split the implicit multiplication priority. Most other calculators just state “implicit multiplication” and that’s it.

My guess is that the list of Type B functions is not complete but implicit multiplication with parentheses should be considered important enough for it to be documented.

Pulptastic,

Negative reviews for the calculator that does OOO wrong.

CallumWells,

I love that the calculators showing different answers are both from the same manufacturer XD

wischi, (edited )

In the blog post there are even more. Texas Instruments, HP and Canon also have calculators, and some of them show 9 and some 1.

dgmib,

You state that the ambiguity comes from the implicit multiplication and not the use of the obelus.

I.e. That 6 ÷ 2 x 3 is not ambiguous

What is your source for your statement that there is an accepted convention for the priority of the iinline obelus or solidus symbol?

As far as I’m aware, every style guide states that a fraction bar (preferably) or parentheses should be used to resolve the ambiguity when there are additional operators to the right of a solidus, and that an obelus should never be used.

Which therefore would make it the division expressed with an obelus that creates the ambiguity, and not the implicit multiplication.

(Rest of the post is great)

wischi, (edited )

In this case it’s actually the absence of sources. I couldn’t find a single credible source that states that ÷ has somehow a different operator priority than / or that :

The only things there are a lot of are social media comments claiming that without any source.

My guess is that this comes from a misunderstanding that the obelus sign is forbidden in a lot of standards. But that’s because it can be confused with other symbols and operations and not because the order of operations is somehow unclear.

dgmib,

What is your source for the priority of the / operator?

i.e. why do you say 6 / 2 * 3 is unambiguous?

Every source I’ve seen states that multiplication and division are equal priority operations. And one should clarify, either with a fraction bar (preferably) or parentheses if the order would make a difference.

wischi, (edited )

Same priority operations are solved from left to right. There is not a single credible calculator that would evaluate “6 / 2 * 3” to anything else but 9.

But I challenge you to show me a calculator that says otherwise. In the blog are about 2 or 3 dozend calculators referenced by name all of them say the same thing. Instead of a calculator you can also name a single expert in the field who would say that 6 / 2 * 3 is anything but 9.

dgmib,

Will you accept wolfram alpha as credible source?

mathworld.wolfram.com/Solidus.html

Special care is needed when interpreting the meaning of a solidus in in-line math because of the notational ambiguity in expressions such as a/bc. Whereas in many textbooks, “a/bc” is intended to denote a/(bc), taken literally or evaluated in a symbolic mathematics languages such as the Wolfram Language, it means (a/b)×c. For clarity, parentheses should therefore always be used when delineating compound denominators.

wischi,

Did you read the blog post? I also quoted the exact same thing.

SkiDude,

It’s also clearly not a bug as some people suggest. Bugs are – by definition – unintended behavior.

There are plenty of bugs that are well documented. I can’t tell you the number of times that I’ve seen someone do something wrong, that they think is 100% right, and “carefully” document it. Then someone finds an edge case and points out the defined behavior has a bug, because the human forgot to account for something.

The other thing I’d point out that I didn’t see in your blog is that I’ve seen many many people say they need to evaluate the 2(3) portion first because “parenthesis”. No matter how many times I explain that this is a notation for multiplication, they try to claim it doesn’t matter because parenthesis. screams into the void

The fact of the matter is that any competent person that has to write out one of these equations will do so in a way that leaves no ambiguity. These viral math posts are just designed to insert ambiguity where it shouldn’t be, and prey on people who can’t remember middle school math.

wischi,

Regarding your first part in general true, but in this case the sheer amount of calculators for both conventions show that this is indeed intended behavior.

Regarding your second point I tried to address that in the “distributive property” section, maybe I need to rewrite it a bit to be more clear.

Lemmygradwontallowme, (edited )
@Lemmygradwontallowme@hexbear.net avatar

The real question here is BODMAS or PEMDAS?

hashbrowns4life, (edited )

Up here in the canada, we did BEDMAS

Brackets, Exponents, Division/Multiplication, Addition/Subtraction

Lemmygradwontallowme,
@Lemmygradwontallowme@hexbear.net avatar

Exponents, Oxponents, I honestly could give less of a shit until now…

keepcarrot,

Also PIMDAS (we had this conversation in my class this semester as we had a very wide range of ages and regions present in the class) (I is for indices) (I don’t remember what the Colombian students said, for some reason we had a group of 3 Colombians in our class of 12 nowhere near Colombia)

That said, the question is ambiguously written. Maybe the popularity of this will result in calculators being more consistent with how they interpret implicit multiplication signs.

(my preference is to show two lines, one with the numerator and one with the divisor)

Lemmygradwontallowme,
@Lemmygradwontallowme@hexbear.net avatar

PIMDAS? Isn’t that the same as PEMDAS?

keepcarrot,

So’s BOMDAS etc.? Just different words for things

Lemmygradwontallowme,
@Lemmygradwontallowme@hexbear.net avatar

Mutiplication or Division first then? Thus, BEDMAS or PEMDAS?

TankieTanuki,

POOTIS or PINGAS?

CarbonScored, (edited )
@CarbonScored@hexbear.net avatar

A fair criticism. Though I think the hating on PEDMAS (or BODMAS as I was taught) is pretty harsh, as it very much does represent parts of the standard of reading mathematical notation when taught correctly. At least I personally was taught its true form was a vertical format:

B

O

DM

AS

I’d also say it’s problematic to rely on calculators to implement or demonstrate standards, they do have their own issues.

But overall, hey, it’s cool. The world needs more passionate criticisms of ambiguous communication turning into a massive interpration A vs interpretation B argument rather than admitting “maybe it’s just ambiguous”.

wischi, (edited )

The problem with BODMAS is that everybody is taught to remember “BODMAS” instead of “BO-DM-AS” or “BO(DM)(AS)”. If you can’t remember the order of operations by heart you won’t remember that “DM” and “AS” are the same priority, that’s why I suggested dropping “division” and “subtraction” entirely from the mnemonic.

It’s true that calculators also don’t dictate a standard but they implement what conventions are typically used in practice. If a convention would be so dominating (let’s say 95% vs 5%) all calculator manufacturers would just follow the 95% convention, except maybe for some very special-purpose calculators.

CarbonScored,
@CarbonScored@hexbear.net avatar

In fairness, I did quite like the suggestion to just remove division and subtraction! One that should be taken to heart :)

kogasa, (edited )
@kogasa@programming.dev avatar

Calculators do not implement “what conventions are typically used in practice.” Entering symbols one by one into a calculator is a fundamentally different process from writing them in a sentence. A basic traditional calculator will evaluate each step as you enter it, so e.g. writing 1 + 2 * 3 will print 1, then 3, then 6. It only gets one digit at a time, so it has no choice. But also, this lends itself to iterative calculation, which is inherently ordered. People using calculators get used to this order of operations specifically while using calculators, and now even some of the fancy ones that evaluate expressions use it. Others switched to the conventional order of operations.

fallingcats, (edited )

Entering symbols one by one into a calculator is a fundamentally different process from writing them in a sentence.

Citation needed.

No but seriously, why do you think it necessarily needs to be different? There are calculators that use actual fraction notation and all that

kogasa,
@kogasa@programming.dev avatar

It’s not that it needs to be different, it’s that it is. The fact that there are calculators with fractional notation is completely irrelevant.

Perfide, (edited )

You lost me on the section when you started going into different calculators, but I read the rest of the post. Well written even if I ultimately disagree!

The reason imo there is ambiguity with these math problems is bad/outdated teaching. The way I was taught pemdas, you always do the left-most operations first, while otherwise still following the ordering.

Doing this for 6÷2(1+2), there is no ambiguity that the answer is 9. You do your parentheses first as always, 6÷2(3), and then since division and multiplication are equal in ordering weight, you do the division first because it’s the left most operation, leaving us 3(3), which is of course 9.

If someone wrote this equation with the intention that the answer is 1, they wrote the equation wrong, simple as that.

abraxas, (edited )

There has apparently been historical disagreement over whether 6÷2(3) is equivalent to 6÷2x3

As a logician instead of a mathemetician, the answer is “they’re both wrong because they have proven themselves ambiguous”. Of course, my answer would be RPN to be a jerk or just have more parens to be a programmer

wischi,

The calculator section is actually pretty important, because it shows how there is no consensus. Sharp is especially interesting with respect to your comment because all scientific Sharp calculators say it’s 1. For all the other brands for hardware calculators there are roughly 50:50 with saying 1 and 9.

So I’m not sure if you are suggesting that thousands of experts and hundreds of engineers at Casio, Texas Instruments, HP and Sharp got it wrong and you got it right?

There really is no agreed upon standard even amongst experts.

kogasa,
@kogasa@programming.dev avatar

Hi, expert here, calculators have nothing to do with it. There’s an agreed upon “Order of Operations” that we teach to kids, and there’s a mutual agreement that it’s only approximately correct. Calculators have to pick an explicit parsing algorithm, humans don’t have to and so they don’t. I don’t look to a dictionary to tell me what I mean when I speak to another human.

fallingcats, (edited )

Thanks for putting my thoughts into words, that’s exactly why I hate math. It was supposed to be the logical one, but since it only needs to be parsed by humans it failed at even that. It’s just conventions upon conventions to the point where it’s notably different from one teacher/professor to the next.

I guess you can tell why I went into comp-sci (and also why I’m struggling there too)

Perfide,

No, those companies aren’t wrong, but they’re not entirely right either. The answer to “6 ÷ 2(1+2)” is 1 on those calculators because that is a badly written equation and you(not literally you, to be clear) should feel bad for writing it, and the calculators can’t handle it with their rigid hardcoded logic. The ones that do give the correct answer of 9 on that equation will get other equations wrong that it shouldn’t be, again because the logic is hardcoded.

That doesn’t change the fact that that equation worked out on paper is absolutely 9 based on modern rules of math. Calculate the parentheses first, you then have 6 ÷ 2(3). We could solve from here, but to make the point extra clear I’m going to actually expand this out to explicit multiplication. “2(3)” is the same as “2 x 3”, so we can rewrite the equation as “6 ÷ 2 x 3”. All operators now inarguably have equal precedence, which means the only factor left in which order to do the operations is left to right, and thus division first. The answer can only be 9.

MeetInPotatoes,

If you’d ever taken any advanced math, you’d see that the answer is 1 all day. The implicit multiplication is done before the division because anyone taking advanced math would see 2(1+2) as a term that must be resolved first. The answer still lies in the ambiguity of the way the problem is written though. If the author used fractions instead of that stupid division symbol, there would be no ambiguity. It’s either 6/2 x 3 = 9 or [6/(2x3)] = 1. Comment formatting aside, if someone put 6 in the numerator, and then did or did NOT put all the rest in the denominator underneath a horizontal bar, it would be obvious.

TL;DR It’s still a formatting issue, but 9 is definitely not the clear and only answer.

brisk,

My only complaint is the suggestion that engineers like to be clear. My undergrad classes included far too many things like 2 cos 2 x sin y

fallingcats,

I’d say engineers like to be exact, but they like being lazy even more

Prunebutt,

If you are so sure that you are right and already “know it all”, why bother and even read this? There is no comment section to argue.

I beg to differ. You utter fool! You created a comment section yourself on lemmy and you are clearly wrong about everything!

You take the mean of 1 and 9 which is 4.5!

/j

SpaceNoodle,

Right, because 5 rounds down to 4.5

Lionel,

…Because 4 rounds up to 4.5

wischi,

@Prunebutt meant 4.5! and not 4.5. Because it’s not an integer we have to use the gamma function, the extension of the factorial function to get the actual mean between 1 and 9 => 4.5! = 52.3428 which looks about right 🤣

Prunebutt,

Not sure if sarcastic and woosh, or adding to the joke ಠ_ಠ

Redjard,
@Redjard@lemmy.dbzer0.com avatar

The mean of 1 and 9 is 5

Prunebutt,

woosh

Sidhean,

Stop it Patrick, you’re scaring them!

stu,

I think you got hit hard by Poe’s Law here. Except it’s more like people couldn’t tell if you were jokingly or genuinely getting your math wrong… Even after you explained you were joking lol

Prunebutt,

I thought the “/j” tone-tag was enough ;_;

Redjard,
@Redjard@lemmy.dbzer0.com avatar

If one doesn’t realize you’re op, the entire thing can be interpreted very differently.
Then “Not sure if sarcastic and woosh, or adding to the joke ಠ_ಠ” could be interpreted as something like “I’m not sure if you are adding to the joke and I’m not understanding it”.

SpaceNoodle,

jarcasm?

Prunebutt, (edited )
wischi,

🤣 I wasn’t even sure if I should post it on lemmy. I mainly wrote it so I can post it under other peoples posts that actually are intended to artificially create drama to hopefully show enough people what the actual problems are with those puzzles.

But I probably am a fool and this is not going anywhere because most people won’t read a 30min article about those math problems :-)

Prunebutt,

I did (skimmed it, at least) and I liked it. 🙃

relevants, (edited )

Actually the correct answer is clearly 0.2609 if you follow the order of operations correctly:

6/2(1+2)
= 6/23
= 0.26

wischi,

🤣 I’m not sure if you read the post but I also wrote about that (the paragraph right before “What about the real world?”)

relevants, (edited )

I did read the post (well done btw), but I guess I must have missed that. And here I thought I was a comedic genius

MrVilliam, (edited )

Nah man, distribute the 2.
6/2(1+2)
= 6/2+4
= 3+4
= 7

This is like 4st grayed maff.

Th4tGuyII,
@Th4tGuyII@kbin.social avatar

@relevants you truly are the smartest of all men

Rinox,

I recall learning in school that it should be left to right when in doubt. Probably a cop-out from the teacher

wischi, (edited )

“when in doubt” is a bit broad but left to right is a great default for operations with the same priority. There is actually a way to calculate in any order if divisions are converted to multiplications (by using the reciprocal value) and subtractions are converted to additions (by negating the value) that requires at least a little bit of math knowledge and experience so it’s typically not taught until later to prevent even more confusion.

For example this: 6 / 2 * 3 can also be rewritten as 6 * 2⁻¹ * 3 and because multiplication is commutative you can now do it in any order for example like 3 * 6 * 2⁻¹

You can also “rearrange” the order without changing the meaning if you move the correct operation (left to the number) with it (should only be done with explicit multiplication)

6 / 2 * 3 into 6 * 3 / 2 (note that I moved the division with the 2)

You can even bring the two to the front. Just remember that left to the six is an “imaginary” (don’t quote me ^^) multiplication. And because we can’t just move “/2” to the beginning we have to insert a one (empty product - check Wikipedia) like so:

1 / 2 * 6 * 3

This also works for addition and subtraction

7 + 8 - 5

You can move them around if you take the operation left to the number with it. With addition the “imaginary” operation at the beginning is a plus sign and the implicit number you use is zero (empty sum - check Wikipedia)

8 - 5 + 7

or like this

0 - 5 + 8 + 7

because with negative numbers you can use the minus sign to indicate negative numbers you can even drop the leading zero like this

-5 + 8 + 7

That’s not really possible with multiplication because “/2” is not a valid notation for “1/2”

Brak,
@Brak@hexbear.net avatar

this is beautiful but my brain glazed over when i saw so many numbers, back to eating glue for me!

MBM,

6 / 2 * 3

Semi-related: something in me wants to read that as 6 / (2*3), because 6 * 3 / 2 feels like a much more ‘natural’ way to write it

Aussiemandeus, (edited )
@Aussiemandeus@aussie.zone avatar

I guess if you wrote it out with a different annotation it would be

‎ ‎ 6

-‐--------‐--------------

2(1+2)

=

6

-‐--------‐--------------

2×3

=

6

–‐--------‐--------------

6

=1

I hate the stupid things though

velox_vulnus,

Markdown fucked your comment. Use escape symbols.

Aussiemandeus,
@Aussiemandeus@aussie.zone avatar

Escape symbols?

onion, (edited )

Lemmy interprets some symbols as formatting commands, for example putting a # at the start of a line turns it into a header:

header

You can tell it to not do that by putting a backslash before the symbol:

# not a header

The backslash is called the escape symbol.

Aussiemandeus,
@Aussiemandeus@aussie.zone avatar

Cheers mate

velox_vulnus, (edited )

Never mind, here’s another better way to do this:

^6^⁄2(1+2) ⇒ ^6^⁄2*3 ⇒ ^6^⁄6 ⇒ 1

Works on the web page, but looks weird on some mobile app. Markdown is a fucking mess. Some implementation has MathJax support, some have special syntaxes.

Rustmilian, (edited )
@Rustmilian@lemmy.world avatar

Lemmy* markdown is a fuckin mess. It’s way better elsewhere. & <>

Aussiemandeus,
@Aussiemandeus@aussie.zone avatar

Yeah connect for lemmy didn’t sort the out very well.

Brak,
@Brak@hexbear.net avatar

oooh this looks very pretty on hexbear, thanks friend!

Aussiemandeus,
@Aussiemandeus@aussie.zone avatar

I guess if you wrote it out with a different annotation it would be

‎ 6

–‐--------‐-------------- 2(1+2)

= 6 –‐--------‐-------------- 2×3

= 6 –‐--------‐-------------- 6

=1

I hate the stupid things though

vithigar,

What’s especially wild to me is that even the position of “it’s ambiguous” gets almost as much pushback as trying to argue that one of them is universally correct.

Last time this came up it was my position that it was ambiguous and needed clarification and had someone accuse me of taking a prescriptive stance and imposing rules contrary to how things were actually being done. How asking a person what they mean or seeking clarification could possibly be prescriptive is beyond me.

Bonus points, the guy telling me I was being prescriptive was arguing vehemently that implicit multiplication having precedence was correct and to do otherwise was wrong, full stop.

Socsa,

Without any additional parentheses, the division sign is assumed to separate numerators and denominators within a complete expression, in which case you would reduce each separately. It’s very, very marginally ambiguous at best.

wischi, (edited )

👍 That was actually one of the reasons why I wrote this blog post. I wanted to compile a list of points that show as clear as humanity possible that there is no consensus here, even amongst experts.

That probably won’t convince everybody but if that won’t probably nothing will.

ook_the_librarian,
@ook_the_librarian@lemmy.world avatar

When I went to college, I was given a reverse Polish notation calculator. I think there is some (albeit small) advantage of becoming fluent in both PEMDAS and RPN to see the arbitrariness. This kind of arguement is like trying to argue linguistics in a single language.

Btw, I’m not claiming that RPN has any bearing on the meme at hand. Just that there are different standards.

This comment is left by the HP50g crew.

ryathal,

It would be better if we just taught math with prefix or postfix notation, as it removes the ambiguity.

ook_the_librarian, (edited )
@ook_the_librarian@lemmy.world avatar

Ambiguity is fine. It would tedious to the point of distraction to enforce writing math without ambiguity. You make note of conventions and you are meant to realize that is just a convention. I’m amazed at the people who are planting their feet to fight for something that what they were taught in third grade as if the world stopped there.

You’re right though. We should definitely teach different conventions. But then what would facebook do for engagement?

Tartas1995, (edited )

I feel like if a blog post presents 2 options and labels one as the “scientific” one… And it is a deserved Label. Then there is probably a easy case to be made that we should teach children how to understand scientific papers and solve the equation in it themselves.

Honestly I feel like it reads better too but that is just me

wischi,

I’m not sure if I’d call it the “scientific” one. I’d actually say that the weak juxtaposition is just the simple one schools use because they don’t want to confuse everyone. Scientist actually use both and make sure to prevent ambiguity. IMHO the main takeaway is that there is no consensus and one has to be careful to not write ambiguous expressions.

Tartas1995,

I mean the blog post says

“If you are a student at university, a scientist, engineer, or mathematician you should really try to ask the original author what they meant because strong juxtaposition is pretty common in academic circles, especially if variables are involved like in $a/bc$ instead of numbers.”

It doesn’t say scientific but…

atomicorange,

I’m a scientist and I’ve only ever encountered strong juxtaposition in quick scribbles where everyone knows the equation already. Normally we’re very careful to use fraction notation (or parentheses) when there’s any possibility of ambiguity. I read the equation and was shocked that anyone would get an answer other than 9.

Tartas1995,

My comment was directed to the blog post and the claims contained in it.

The blog post claims it is popular in academy, if that is a deserved label, then I don’t understand how the author of the post lands on “there is no good or bad way, they are all valid”. I am in favor of strong juxtaposition but that is not the case that I am making here. Sorry for the confusion.

Kowowow,

Nope it’s bedmas since everything is brackets

wischi,

Sorry but I don’t follow. Did you read the blog post?

Kowowow,

Those hoity toity with their parentheses don’t know what it is to struggle

Rustmilian,
@Rustmilian@lemmy.world avatar

The only correct answer is 8008135.

ignotum,

Oh i get it, if you flip that upside down it says “seiboob”

Rustmilian, (edited )
@Rustmilian@lemmy.world avatar

1337 5|*34X 15 [)34[) |V0// 83(4()53 0|= 70().

ralakus,

Leet speak is dead now because of you.

Aremel, (edited )

It sure is. 13 year old me would have no trouble deciphering this, but I only got up to [)34[).

Edit: I still got it. L337 H4xor PhoR L1F3

Waldowal,
@Waldowal@lemmy.world avatar

Which is French for “the boob”.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • memes@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #