the distributive property is being murdered by retards who slept through middle school algebra and this will probably result in a plane crashing into a stadium full of orphans at some point
@basadeskaiser@deprecated_ii north american teachers should have no say in standars, they lower standars for negros all the time thus they have no authority on any matter.
@EdBoatConnoisseur@deprecated_ii this is an actual case where gloablism and muh international standards have a case to do something useful. It appears north american teachers screwes up maths for all of us. Never allow teachers to voice their opinion about anything. Standards should be set by engineers who actually have briges falling down id they screw up. Teachers should learn their place as overglorified nannies that rank below youtubers ans prostitutes.
@deprecated_ii i just did it in my head real quick and also got 1, I don't understand where the confusion is coming from? im not fantastic at math (anymore) and don't remember the reasoning for a lot of things, but like... isn't this just order of operations?
@deprecated_ii Oh I love this conversation, we had it before! Yes it's 1, but... just wanted to make a little correction: even software that evaluates blindly left to right is correct, simply by virtue of the way lexers work. Here, "EXP" means "Expression," so the calculator's software still works correctly. The calculator then terminates the sequence because there is nothing after the last closed-parenthesis. Then you evaluate this bottom up, dividing 6 by 6 to get 1. :towa_thumb:
But yes, to really settle this tired old nonsense, you simply need to turn everything into variables and find that the distributive property is what decisively makes this expression evaluate into 1.
@Cayhr@deprecated_ii OH MAN, ABSTRACT SYNTAX TREES I implemented one of these as part of one of my projects... that was interesting and (not) fun to debug.
@deprecated_ii@warmbeverageenjoyer@LukeAlmighty OK, here I have a mathematician explaining this exact equation in a way that's easier than what I would do. And I'll use it because he reached the same conclusion as me, so I have confirmation bias.
But note that he doesn't say anything about the distributive property, because it really doesn't fit here. Saying that 2(1+2) is it's own equation that must be solved separately is not true, because there is nothing saying it is. You are assuming that 2(1+2) is just a 6 that was split, instead of being a equation that was reached through the insertion of numbers into variables or through the solving of previous equations.
Note that I had a wrong assumption in my last post, because I was taking a look at my college algebra books, and even in algebra you have a liberal use of parenthesis to avoid this kind of confusion.
6/2a is completely different from 6/(2a), wherein the first one is seen as
6 __ a 2
and the second is seen as
6 __ 2a
(the formatting is terrible, but I think it can be understood).
@Suzu@warmbeverageenjoyer@LukeAlmighty Because 2(1+2) is its own expression. And yes, 6/2(1+2) follows the same rules as algebra. Why would it be any different? What's the point of teaching arithmetic rules if they're not going to be foundational to algebra?
@LukeAlmighty@warmbeverageenjoyer and you're wrong, because 2(1+2) is the same thing as ((2*1)+(2*2)), because that's what the distributive property means
@deprecated_ii@warmbeverageenjoyer@LukeAlmighty but here's the thing: why does the distributive property happen before the division? I understand, when you talk in terms of algebra, it makes sense that 6/2a, where a = 1+2 will give you the result 1, but the equation 6/2(1+2) is not algebra, and 2(1+2) is just a different way to write 2 * (1+2), the fact the 2 is next to the parenthesis doesn't turn it into a special operator that bypasses PEMDAS.
In the end, math is just a language used to express calculations, and just like any language, there are some conventions, and it requires some clarity on the part of the person writing it. Just like the other stupid equation that caused internet drama earlier this year, this is something that can be solved with the liberal use of parenthesis, you can't just have a regular equation with no context whatsoever and expect people to treat it as an algebraic equation.
@deprecated_ii@warmbeverageenjoyer No, we get 9 because ÷ and / are treated as the same symbol, meaning, that (1+2) goes first, and then, we end up with 6/2*3 = 3*3 = 9
And it's boring to explain this system over and over and over again. But division is the same as multiplication.
If I re-write it as 6* (1/2) * (1+2), then there is no argument to be had.
@Suzu@deprecated_ii@LukeAlmighty@warmbeverageenjoyer I think what confuses people is 2(3) being written as it is. You have 6/2 having a symbol while 2(3) doesn't, even though this is just a short way of writing it and 6/2(3) = 6/2*(3). this then leads to thinking the one without a symbol is "closer" and needs to be solved first. Though your take is likely true as well.
@Feinmuehrer@LukeAlmighty@deprecated_ii@warmbeverageenjoyer I actually remember back during the previous drama that a lot of people were reaching the 1 conclusion by saying that the symbol ÷ meant you had to divide everything on the left side by everything on the right side. I though these people were just dumb, but, as he explained, it seems there is some hystorical basis on it being used like that a long time ago.
@deprecated_ii I HAD TO EDIT A TYPO :zt_scream: I am clearly not professional yet. I spent too much time on this. Being an artist, autist, and a programmer has its perks though.
Have fun. I now have it at the ready in case I need to just quickly copy pasta when the convo appears again :konata_yawn:
(1) Lexers just turn a string of text into a list of tokens, and don't have any mechanism for operator precedence at all. The result of any lexer will just be:
NUM(6) DIV NUM(2) LPAREN NUM(1) PLUS NUM(2) RPAREN
(2) To actually create an AST, that requires us to parse this list, which gives us the ability to declare operator precedence. Without it, you can easily have it parse:
2 * 3 + 4
And it will happily parse it as:
2 * (3 + 4)
Because it just comes down to the order in which the AST was assembled. In fact, it will actually evaluate right to left consistently, and this is masked by the fact that the original expression had parenthesis at the right-most side.
(3) Also, your analysis gives the impression that if you were to pass it something with an explicit multiplication sign that it will still work this way, which is something that deprecated wasn't even claiming:
6 / 2 * (2 + 1) = 1
The entire debate is about whether the "/" or "*" gets evaluated first, and if you actually have an explicit multiplication sign, then it would be uncontroversial that it would be parsed like so:
(6 / 2) * (2 + 1) = 3 * 3 = 9
As I mentioned in a prior post, it's because the multiplication is by juxtaposition that some people give it a higher level of precedence:
6 / 2(2 + 1) = 6 / (2 * (2 + 1)) = 1
(4) The distributive property doesn't matter here because you can do the same thing with the other order of operations:
@RealAkoSuminoe Yeah this is very fair, I'm reading more and I haven't been able to recall nor find any literature on implicit multiplication laws. Is the 2 bound to the parenthesis? Where did that concept come from, and why do I think that? Because 6/2(3)... well, that would yield 9. So in a way I myself have rewritten the problem to be interpreted in the way I wanted it to be.
I started at either 9 or 1, to it's definitely 1, but now I'm starting to get confused again. Haha, such is the folly of hubris. The truth is that this expression simply SUCKS.
This is also why we just get redundant with parentheses to ensure maximum clarity. When I was in Calc 3 I used parentheses exhaustively for even simple expressions, and a few classmates would cause problems for themselves during evaluation steps and the error would propagate. The big problem with 6/2(1+2) is that none of the numbers have any meaning, so what even is the point of evaluating it?
Still, it was fun to make the infographic supporting the answer is 1. Thanks a lot for your input.
@Cayhr@deprecated_ii here is the thing, I'll try to make it easier by turning everything into a multiplication:
We can agree that 6 / 2 can be written as 6 * (1/2) (the 1/2 is a fraction, 1 over 2, but I can't format it that way in fedi), right?
So we can say that 6/2(1+2) can be written as 6 * (1/2)(1 + 2), right?
Associative properties with multiplication says that I can evaluate it either as (6 * (1/2)) * (1 + 2) or I can evaluate it as 6 * ((1/2) * (1+2)). Heck, I can even go completely wild and evaluate it as (6 * (1 + 2)) * (1/2). This is "high math". This is using the associative properties. Fuck, I can even use distributive right now. I can use distributive either by distributing 6 (1 + 2) or by distributing (1/2)(1 + 2). What will be the result?
The problem here is that by just blindingly using the distributive property in 2(1+2), you guys are turning (1+2) into 1/(1+2) (you are throwing the (1+2) part down, to the denominator). And that's wrong, unless you have a parenthesis separating the whole denominator, like 6/(2(1+2)). You can't just arbitrarily decide where you are applying the properties in just a part of the equation, you can't decide that 2(1+2) is a single number based on gut feeling. It doesn't matter if you did it before and it worked, it's wrong. It's a wrong notation, and in this specific equation, it makes you reach the wrong conclusion.
@RealAkoSuminoe I'm thinking back to when I was programming a pseudo physics engine in Unity when I was making a platforming game prototype. Each number in an operation had a meaning, and I knew how the operations would need to be done.
If the contentious expression was in the context of an actual problem, it could have been formulated according to the problem requirement of: "X divided by twice the sum of Y and Z." Now the numbers have meaning, and this expression is much more clear. But in another context it could be "half A times the sum of B and C," and we would just put parentheses to distinguish it as such. 6/(2(1+2)) vs (6/2)(1+2).
In a short amount of time you have rectified my arrogant outlook on the problem back to where I originally was on ambiguity, so I thank you for that :nana_thumb:
@Cayhr Fully agree with this. It's a bad expression and if asked to evaluate the first step should always be to ask for a clarification.
According to Wikipedia, the rule about multiplication by juxtaposition having a higher precedence came from a physics journal, but that journal still says to avoid writing expressions that would use that.