programming.dev

Th4tGuyII, (edited ) to memes in 6÷2(1+2)
@Th4tGuyII@kbin.social avatar

The answer realistically is determined by where you place implicit multiplication (or "multiplication by juxtaposition") in the order of operations.

Some place it above explicit multiplication and division, meaning it gets done before the division giving you an answer of 1

But if you place it as equal to it's explicit counterparts, then you'd sweep left to right giving you an answer of 9

Since those are both valid interpretations of the order of operations dependent on what field you're in, you're always going to end up with disagreements on questions like these...

But in reality nobody would write an equation like this, and even if they did, there would usually be some kind of context (I.e. units) to guide you as to what the answer should be.

Edit: Just skimmed that article, and it looks like I did remember the last explanation I heard about these correctly. Yay me!

wischi,

Exactly. With the blog post I try to reach people who already heared that some people say it’s ambiguous but either down understand how, or don’t believe it. I’m not sure if that will work out because people who “already know the only correct answer” probably won’t read a 30min blog post.

Th4tGuyII,
@Th4tGuyII@kbin.social avatar

Unfortunately these types of viral problems are designed the attract people who think they "know it all", so convincing them that their chosen answer isn't as right as they think it is will always be an uphill challenge

BCsven,

yeah, our math profs taught if the 2( is to be separated from that bracket for the implied multiplication then you do that math first, because the 2(1+2) is the same as (1+2)+(1+2) and not related to the first 6.

Th4tGuyII, (edited )
@Th4tGuyII@kbin.social avatar

So you were taught strong juxtaposition then, where the implicit multiplication takes priority?

BCsven,

if it was 6÷2x(2+1) they suggested do division and mult from left to right, but 6÷2(2+1) implied a relationship between the number outside the parenthesis and inside them, and as soon as you broke those () you had to do the multiplication immediately that is connected to them. Like some models of calculatora do. wasn’t till a few yeara ago that I heard people were doing it differently.

sverit,

Yeah, that’s why fractions are good thing.

agni, to memes in 6÷2(1+2)

.

wischi,

?

Iapar,

!

Peter_Arbeitslos,
@Peter_Arbeitslos@feddit.de avatar

,

Opitech,

anzo, to programmer_humor in Release notes of an open source app. Someone is pretty mad at Canonical for Snap

This post title is misleading. The developer was working with Snap until Canonical didn’t allowed it anymore. He’s pissed with the policy enforcement which is strictly speaking commercial and as bad as Apple’s afaik…

suy,

Sorry, could you clarify what you mean? I don’t see the difference. Isn’t the author complaining about Canonical for the policy enforcement?

anzo,

Canonical has been taking bad decisions for quite some time now, and this developer was trying to reach Ubuntu users even while probably knowing these. Which makes sense, of course. The point being that this dev’s disappointment seems quite specific in these notes (against Snap), and imho he might work again towards shipping their app through Snap if he was allowed to. My comment compares Canonical to Apple, to give some context of where Canonical is at so many other idiosyncrasies (for example, I also heard other bad stuff about their H.R., in particular a way too lengthy hiring process.)

Kichae, (edited ) to memes in 6÷2(1+2)

Ackshually, the answer is 4

6÷2*(1+2)

6÷(1+2)*2

6÷(3)*2

2*2

4

You’re welcome

Littleborat,

If there are rules about which dot comes first then you are not allowed to do this.

ryathal,

You aren’t allowed to do this because division isn’t transitive.

atomicorange,

c/TheyDidAMath

CowsLookLikeMaps,

psychopath

deadbeef79000, (edited )

Psychomath

kogasa, (edited ) to memes in 6÷2(1+2)
@kogasa@programming.dev avatar

It’s not ambiguous, it’s just that correctly parsing the expression requires more precise application of the order of operations than is typical. It’s unclear, sure. Implicit multiplication having higher precedence is intuitive, sure, but not part of the standard as-written order of operations.

wischi,

I’d really like to know if and how your view on that matter would change once you read the full post. I know it’s very long and a lot of people won’t read it because they “already know” the answer but I’m pretty sure it would shift your perception at least a bit if you find the time to read it.

kogasa,
@kogasa@programming.dev avatar

My opinion hasn’t changed. The standard order of operations is as well defined as a notational convention can be. It’s not necessarily followed strictly in practice, but it’s easier to view such examples as normal deviation from the rules instead of an implicit disagreement about the rules themselves. For example, I know how to “properly” capitalize my sentences too, and I intentionally do it “wrong” all the time. To an outsider claiming my capitalization is incorrect, I don’t say “I am using a different standard,” I just say “Yes, I know, I don’t care.” This is simpler because it accepts the common knowledge of the “normal” rules and communicates a specific intent to deviate. The alternative is to try to invent a new set of ad hoc rules that justify my side, and explain why these rules are equally valid to the ones we both know and understand.

wischi,

What is the correct answer according to the convention you follow?

kogasa,
@kogasa@programming.dev avatar

I have a masters in math, please do not condescend. I’m fully aware of both interpretations and your overall point and I’ve explained my response.

wischi,

I still don’t see a number ;-) but you can take a look at the meme to see other people with math degrees shouting at each other.

kogasa,
@kogasa@programming.dev avatar

Sorry your article wasn’t as interesting as you hoped.

onion,

The difference is that there are two sets of rules already in use by large groups of people, so which do you consider correct?

kogasa,
@kogasa@programming.dev avatar

There aren’t.

Th4tGuyII,
@Th4tGuyII@kbin.social avatar

They weren't asking you if there are two sets of rules, we're in a thread that's basically all qbout the Weak vs. Strong juxtaposition debate, they asked you which you consider correct.

Giving the answer to a question they didn't ask to avoid the one they did is immature.

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

Ah yes, simply “answer the question with an incorrect premise instead of refuting the premise.” When did you stop beating your wife?

That’s not what they asked me. I have no problem answering questions that are asked in good faith.

Th4tGuyII, (edited )
@Th4tGuyII@kbin.social avatar

I can't have stopped because I never started, because I'm not even married... See, even I can answer your bad faith question better than you answered the one @onion asked you.

But I will give it to you that my comment should've stipulated avoiding reasonable questions.

The difference is that there are two sets of rules already in use by large groups of people, so which do you consider correct?

However I still think you need your eyes checked, as the end of this comment by @onion is very clearly a question asking you WHICH ruleset you consider correct.

Unless you're refusing the notion of multiplication by juxtaposition entirely, then you must be on one side of this or the other.

kogasa,
@kogasa@programming.dev avatar

“Which ruleset do you consider correct” presupposes, as the comment said, that there are 2 rulesets. There aren’t. There’s the standard, well known, and simplified model which is taught to kids, and there’s the real world, where adults communicate by using context and shared understanding. Picking a side here makes no sense.

Th4tGuyII,
@Th4tGuyII@kbin.social avatar

When the @onion said there were two different sets of rules, you know as well as I do that they meant strong vs. weak juxtaposition.

You're right that in reality nobody would write an equation like this, and if they did they would usually provide context to help resolve it without resorting to having to guess...

But the point of this post is exactly to point out this hole that exists in the standard order of operations, the drama that has resulted from it, and to shine some light on it.

Picking a side makes no sense only if you have the context to otherwise resolve it... If you were told to solve this equation, and given no other context to do so, you would either have to pick a side or resolve it both ways and give both answers. In that scenario, crossing your arms and refusing to because "it doesn't make sense" would get you nowhere.

In all honesty, I think you're acting like the people who say things like "I've never used algebra, so it was worthless teaching me it as a kid" as though there aren't people who would learn something out of this.

kogasa,
@kogasa@programming.dev avatar

You are literally so far removed from this conversation I don’t know what to do with you. Good luck.

Th4tGuyII,
@Th4tGuyII@kbin.social avatar

That's rich considering what sparked this conversation was you refusing to answer a simple question.

Good luck to you too - with reading comprehension like your's, you might just need it.

kogasa,
@kogasa@programming.dev avatar

with reading comprehension like your’s

Man.

Th4tGuyII,
@Th4tGuyII@kbin.social avatar

I'll just say it again, you're the one saying this problem is completely unambiguous, with your only explanation as to why being that real people communicate as though that solves every edge case imaginable.

I'm just saying, if you really believe that to be the case, Good luck.

Pacmanlives, (edited ) to programmer_humor in Manager: This task only takes 30 minutes. Why did it take you the whole day?

git commit -m “changed somethings “

git push origin master

jelloeater85,
@jelloeater85@lemmy.world avatar

Do you always have to do origin master? I’ve seen it where sometimes just git push works and other times not.

Meowoem,

I think it depends what branch your local version of the repo is set to. If you’re already in master then it’ll push there, if you’re in a testing branch then you can push it straight to master instead by telling it to

jelloeater85,
@jelloeater85@lemmy.world avatar

I just meant it not auto creating a new matching named branch.

zcoyle,

where it Just Works, the branch is set up to track a remote branch

git-scm.com/book/…/Git-Branching-Remote-Branches

Valmond,

push origin your/branch

Pushes, you guessed it, your/branch!

Head is usually your checked out working branch if you’re not in a headless state, right?

sloppy_diffuser,
adrian783,

uh in any actual company you almost never push to origin master. so I think it’s a joke.

Valmond, (edited )

Depends on the configuration right?

You can work on your branch and then push that to integration for example.

I mean you’re not working on your local master/main branch right?

MajorHavoc,

Not with that attitude! /s

jelloeater85,
@jelloeater85@lemmy.world avatar

Force push Fridays!

TheUncannyObserver,

That’s part of the joke, I think. If it’s a repo more than just you use, you would almost never push directly to the main branch.

MajorHavoc,

You forgot this –force flag.

Valmond,

I’m too lazy, I use -f

lurch, to programmer_humor in When you forget to set a boundary conditions in your logic

Did you live on a very fast spaceship maybe?

… or did you travel back to the start of 2023 multiple times, trying to fix the world? It would explain a lot of things.

bleistift2, to programmer_humor in When you forget to set a boundary conditions in your logic

Frequent flyer?

9point6, to programmer_humor in When you forget to set a boundary conditions in your logic

More days per day

otherbarry, to lotrmemes in Apology

Ah I remember that one, that AI image looked just like one of those weird t-shirt spam posts LOL.

That aside not quite sure what position this community takes on AI generated posts. Personally I’m here for the normal memes so I’d probably unsub if it was flooded with AI posts, but just a random post once in a while isn’t a big deal. For what it’s worth there are definitely communities around that cater to AI image posts, you could try one of those instead.

MacNCheezus, to memes in Apology
@MacNCheezus@lemmy.today avatar
Littleborat, to memes in 6÷2(1+2)

You guys are doing it all wrong: ask chatgpt for the correct answer and paste it here. Done.

Who needs to learn or know anything really?

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

ChatGPT’s Answer:

The expression 6/2(1+2) involves both multiplication and division. According to the order of operations (PEMDAS/BODMAS), you should perform operations inside parentheses first, then any multiplication or division from left to right.

Let’s break down the expression step by step:

Inside the parentheses: 1 + 2 = 3

Now the expression becomes 6/2 * 3

Division: 6/2 = 3

Multiplication: 3 * 3 = 9

So, 6/2(1+2) is equal to 9.

wischi,

Chat GPT’s answer for me:

Certainly! The expression 6/2(1+2) is ambiguous due to the implicit multiplication. Let’s solve it in both ways:

  1. Implicit multiplication with higher priority:

[ \frac{6}{2}(1+2) ]

First, solve the parentheses:

[ \frac{6}{2}(3) ]

Now, perform the division:

[ 3 \times 3 = 9 ]

  1. Implicit multiplication with the same priority as division:

[ \frac{6}{2(1+2)} ]

Again, solve the parentheses:

[ \frac{6}{2(3)} ]

Now, perform the multiplication first:

[ \frac{6}{6} = 1 ]

So, depending on the interpretation of implicit multiplication, you can get different results: 9 or 1.

I think it’s funny that ChatGPT figured out 1 and 9 but has the steps completely backwards. First it points out what has high priority and then does the exact opposite, both times 🤣

wren, to memes in 6÷2(1+2)
@wren@sopuli.xyz avatar

Great read! Easy for everyone to understand, but also thorough. I loved the breakdown into the calculators functionality

wischi,

Thank you for taking the time reading it.

ReCursing, to memes in Apology
@ReCursing@kbin.social avatar

Wow, that's a dumb take!

fckgwrhqq2yxrkt, to memes in Apology

At the very least, ai generated content needs to be clearly indicated. I have been surrounding things with the robot emoji, eg: “🤖ai content🤖”, whenever sharing something machine generated, and most people seem to be understanding what it means. Ai is here to stay, and many will use it for personal gain. We need at least some basic standards around the content so we can keep track of it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #