mindbleach,

Different compilers have robbed me of all trust in order-of-operations. If there’s any possibility of ambiguity - it’s going in parentheses. If something’s fucky and I can’t tell where, well, better parenthesize my equations, just in case.

Crozekiel,

This is the way. It’s an intentionally ambiguously written problem to cause this issue depending on how and where you learned order of operations to cause a fight.

SmartmanApps,
@SmartmanApps@programming.dev avatar

intentionally ambiguously written

learned order of operations to cause a fight

The order of operations are the same everywhere. The fights arise from people who don’t remember them.

Crozekiel,

Please see this section of Wikipedia on the order of operations.

The “math” itself might not be ambiguous, but how we write it down absolutely can be. This is why you don’t see actual mathematicians arguing over which one of these calculators is correct - it is not either calculator being wrong, it is a poorly constructed equation.

As for order of operations, they are “meant to be” the same everywhere, but they are taught differently. US - PEMDAS vs UK - BODMAS (notice division and multiplication swapped places). Now, they will say they are both given equal priority, but you can’t actually do all of the multiplication and division at one time. Some are taught to simply work left to right, while others are taught to do multiplication first; but we are all taught to use parentheses correctly to eliminate ambiguity.

SmartmanApps,
@SmartmanApps@programming.dev avatar

Please see this section of Wikipedia on the order of operations

That section is about multiplication, and there isn’t any multiplication in this expression.

The “math” itself might not be ambiguous, but how we write it down absolutely can be

Not in this case it isn’t. It has been written in a way which obeys all the rules of Maths.

This is why you don’t see actual mathematicians arguing over which one of these calculators is correct

But I do! I see University lecturers - who have forgotten their high school Maths rules (which is where this topic is taught) - arguing about it.

it is not either calculator being wrong

Yes, it is. The app written by the programmer is ignoring The Distributive Law (most likely because the programmer has forgotten it and not bothered to check his Maths is correct first).

US - PEMDAS vs UK - BODMAS

Those aren’t the rules. They are mnemonics to help you remember the rules

notice division and multiplication swapped places

Yes, that’s right, because they have equal precedence and it literally doesn’t matter which way around you do them.

you can’t actually do all of the multiplication and division at one time

Yes, you can!

Some are taught to simply work left to right

Yes, that’s because that’s the easy way to obey the actual rule of Left associativity.

we are all taught to use parentheses correctly to eliminate ambiguity

Correct! So 2(2+2) unambiguously has to be done before the division.

Crozekiel,

Just out of curiosity, what is the first 2 doing in “2(2+2)”…? What are you doing with it? Possibly multiplying it with something else?

there isn’t any multiplication in this expression.

Interesting.

I really hope you aren’t actually a math teacher, because I feel bad for your students being taught so poorly by someone that barely has a middle school understanding of math. And for the record, I doubt anyone is going to accept links to your blog as proof that you are correct.

SmartmanApps,
@SmartmanApps@programming.dev avatar

Just out of curiosity, what is the first 2 doing in “2(2+2)”…? What are you doing with it? Possibly multiplying it with something else?

Distributing it, as per The Distributive Law. Even Khan Academy makes sure to not call it “multiplication”, because that refers literally to multiplication signs., which, as I said, there aren’t any in this expression - only brackets and division (and addition within the brackets).

https://programming.dev/pictrs/image/8883c191-8fce-4ab8-875c-20454576dd0a.jpeg

I feel bad for your students

My students are doing well thanks.

https://programming.dev/pictrs/image/0cf3ae5a-febd-4397-9a35-6d5e12c818f3.png

I doubt anyone is going to accept links to your blog as proof that you are correct

You mean the blog that has Maths text book references, historical Maths documents, and proofs? You know proofs are always true, right? But thanks for the ad hominem anyway, instead of any actual proof or evidence to support your own claims.

SmartmanApps,
@SmartmanApps@programming.dev avatar

Different compilers

Different programmers.

it’s going in parentheses

Unfortunately some places don’t care where you’ve put brackets, they’ll just go ahead and change it anyway. Welcome to my quest to educate.

https://programming.dev/pictrs/image/048f671e-047a-4ed7-af0a-85d3c6bcff6b.jpeg

mindbleach,

That’s the same ambiguity, numbnuts. Your added parentheses do nothing. If you wanted to express the value 8 over the value 2*(1+3), you should write 8/(2*(1+3)). That is how you eliminate other valid interpretations.

As illustration of why there are competing valid interpretations: what human being is going to read “8/2 * (1+3)” as anything but 4*4? Those spaces create semantic separation. But obviously most calculators don’t have a spacebar, any more than they have to ability to draw a big horizontal line and place 2(1+3) underneath it. Ambiguous syntax for expressing mathematics is not some foundation-shaking contradiction. It’s a consequence of limitations in how we express even the most concrete ideas.

“The rules of math” you keep spamming about are not mathematical proofs - they’re arbitrary decisions made by individuals and organizations. In many cases the opposite choice would be equally sensible. Unlike the innate equivalence of multiplication and division, where dividing by two and multiplying by half are interchangeable. Same with addition and subtraction.

Do you want to argue that 8 - (2) + (1+3) should be 2?

SmartmanApps,
@SmartmanApps@programming.dev avatar

Your added parentheses do nothing

So you’re saying Brackets aren’t first in order of operations? What do you think brackets are for?

If you wanted to express the value 8 over the value 2*(1+3), you should write 8/(2*(1+3))

or, more correctly 8/2(1+3), as per the rules of Maths (we never write unnecessary brackets).

That is how you eliminate other valid interpretations

There aren’t any other valid interpretations.

what human being is going to read “8/2 * (1+3)” as anything but 4*4

Yes, that’s right, but 8/2x(1+3) isn’t the same as 8/2(1+3). That’s the mistake that a lot of people make - disobeying The Distributive Law.

Those spaces

…have no meaning in Maths. The thing that separates the Terms, in your example, is the multiply. i.e. an operator.

most calculators don’t have a spacebar

…because it’s literally meaningless in Maths.

any more than they have to ability to draw a big horizontal line and place 2(1+3) underneath it

Some of them can actually.

“The rules of math” you keep spamming about are not mathematical proofs

You should’ve read further on then. Here’s the proof.

they’re arbitrary decisions made by individuals

No, they’re a natural consequence of the way we have defined operators. e.g. 2x3=2+2+2, therefore we have to do multiplication before addition.

In many cases the opposite choice would be equally sensible

2+2x3=2+6=8 the correct answer, but if I do addition first…

2+2x3=4x3=12, which is the wrong answer. How is getting the wrong answer “equally sensible” as getting the right answer?

Do you want to argue that 8 - (2) + (1+3) should be 2?

No, why would I do that? 8-(2+1+3) does equal 2 though.

mindbleach,

You are a smug idiot.

8/2(1+3) is exactly the sort of thing programs love to misinterpret. I don’t give a shit what “rules of math” you insist are super duper universal, or what “we” do. They are not reliable. Clear parentheses are. Insisting you’re correct is not relevant. You stumbled into a pragmatic issue with grand philosophical assurances that aren’t even sound.

Yes, that’s right, but 8/2x(1+3) isn’t the same as 8/2(1+3).

… no, that’s fucking stupid.

Some of them can actually.

Hence the word “most.” Your cocksure months-late manic episode across this thread is the most “akshually” thing I have ever witnessed.

Here’s the proof.

You dense bastard! That’s a category error! You can’t prove that 2(3) means something different from 2*3. It’s only convention! It’s a thing we made up, unlike actual mathematical proofs, which are laws of the universe. If everyone disagreed with that then it would stop being true. That’s not a sentence you can say about anything that has a proof, instead of some evidence.

You keep talking about “rules of math” when what you mean is rules of this particular notation. Reverse Polish Notation doesn’t have this issue, at all. Distribution is not even possible in RPN. So however important you think it might be… it’s not universal.

[Those spaces] have no meaning in Maths.

THAT’S THE POINT, NUMBNUTS. It’s semantic separation that human beings will read in for context. Which they need, because some grammars have ambiguities, which can only be resolved by convention. Like how -6 is a number, and you can add or multiply -6, but 1 + -6 looks kinda weird, -6(3) is fine, and (3) -6 is asking for trouble.

The convention overwhelmingly used in computation is that parentheses are resolved first. Nothing is distributed over them - they are evaluated, and then used. In exactly the same way that multiplication can be treated as repeated addition, operations on parentheticals are treated as operations on equations reduced to scalars. It doesn’t fucking mean anything, to say 8/2*(1+3) is different from 8/2(1+3), because in the notation used by coders, they both become 8/2*4.

You might as well barge in pick a fight with N=N+1.

SmartmanApps,
@SmartmanApps@programming.dev avatar

You are a smug idiot

That’s your colloquialism for Maths teachers. Ok, got it.

8/2(1+3) is exactly the sort of thing programs love to misinterpret.

Programs, written by programmers, who have forgotten the rules of Maths.

that’s fucking stupid

So you’re saying the rules of Maths are stupid. Got it.

You can’t prove that 2(3) means something different from 2*3. It’s only convention!

No, it’s a rule of Maths - it’s literally the opposite operation to factorising.

https://programming.dev/pictrs/image/b7c076a5-a8fe-404f-a40b-a1b9118b0b21.jpeg

It’s a thing we made up

Nothing in Maths is made up. It’s based on our observations of how things work.

mathematical proofs, which are laws of the universe

Now you’re getting it.

this particular notation

…which is Maths.

Reverse Polish Notation doesn’t have this issue, at all

Neither does infix notation. All notations have to obey the rules of Maths, since the rules of Maths are universal.

Distribution is not even possible in RPN

Second hit in my Google results…

https://programming.dev/pictrs/image/170be4ec-55d6-4e36-98d0-0c2233e33fc2.png

(3) -6 is asking for trouble

It’s -3 - where’s the trouble?

say 8/2*(1+3) is different from 8/2(1+3), because in the notation used by coders, they both become 8/2*4

Welcome to why almost every single e-calculator is wrong (as opposed to handheld calculators) - MathGPT gets it right.

mindbleach,

Nothing in Maths is made up. It’s based on our observations of how things work.

The notation and syntax of how we express that, is made-up. There’s multiple options. There’s disagreements. Fuck me sideways, you are a teacher, and you can’t figure out how being off-topic works?

Evidently not, as you flip between ‘this particular notation is the notation!’ to ‘of course other notations exist’ and suffer zero cognitive dissonance. By capital-M “Maths,” do you mean the notation on paper, or the underlying laws-of-reality stuff? It depends! It’s ambiguous and requires context, or maybe you’re just factually wrong at least one of those times, and either way, that means it’s plainly not THE SAME KIND OF THING as the laws-of-reality stuff.

It’s a category error. You can prove that the word prove isn’t spelled proove, for some reason, but the heavens would not bend the other direction if that changed. We could swap square braces and parenthesis and nothing would be different. We could use the glyph “&” instead of “7.” These details are mutable and completely fucking arbitrary. But then & - 6 = 1, and you could never proove otherwise.

Second hit in my Google results…

Shows B being subtracted from A before that value is multiplied by C. It’s not distribution. It’s evaluating the parenthetical.

It’s -3 - where’s the trouble?

The fact it’s 3 and -6, not 3 - 6. Which is why I explicitly mentioned that -6 was a number, and used two other examples with -6. I wasn’t just making conversation. Jesus fucking Christ, a state trusts you with the education of children.

According to the textbook you’re now screenshotting at people, A(B) and (B)A are both correct - yes? They’re both valid? And spaces have no impact on an equation? And writing equations like -6 + 1 are fine, instead of (-6) + 1, since you don’t want needless parentheses?

SmartmanApps,
@SmartmanApps@programming.dev avatar

‘this particular notation is the notation!’ to ‘of course other notations exist’

The notation for division in some countries is the obelus, in other countries it’s a colon. Whatever country you’re in, the notation for that country is the notation for division (be it an obelus or a colon).

Maths,” do you mean the notation on paper, or the underlying laws-of-reality stuff

Both! Whatever notation your country uses, all the rules for Maths and use of that Maths notation are defined.

It’s ambiguous

No, it’s not.

It’s not distribution. It’s evaluating the parenthetical

And Distribution applies to brackets/parentheses where they have a coefficient. In other words, same same.

it’s 3 and -6, not 3 - 6

You didn’t put a comma between 3 and -6, so no, it’s not 3 and -6, it’s 3-6. That’s what you wrote, that’s what it is.

a state trusts you with the education of children

Related - have you noticed how children never get this wrong? It’s only adults who’ve forgotten the rules of Maths who get it wrong.

According to the textbook you’re now screenshotting at people, A(B) and (B)A are both correct - yes? They’re both valid? And spaces have no impact on an equation? And writing equations like -6 + 1 are fine, instead of (-6) + 1, since you don’t want needless parentheses?

Yes (though the latter is unconventional), yes (though the latter is unconventional), yes, yes (though unconventional - 1-6 is the conventional way to write that), yes, yes.

mindbleach,

Again pointing straight at RPN: does the colon go between the operands, or after them? That too is notation. That too is negotiable.

The parts of mathematics that are eternal and discovered are separate from the parts that are arbitrary and invented. We are talking almost exclusively about the latter.

Both!

It’s ambiguous

No, it’s not.

Do you read the things you write?!

And Distribution applies to brackets/parentheses where they have a coefficient. In other words, same same.

No.

What?

No!

Do you even know what your argument is?

The central point you spammed a dozen people with, here in this thread from last year, is an insistence that multiplying by a parenthetical is different from distribution. You explicitly said 2(3+1) and 2*(3+1) are not the same thing. So when your hot second of Google knowledge shows (3+1), *2, converted to RPN, you do not get to claim that’s the same thing as distribution, goddammit!

You didn’t put a comma between 3 and -6, so no, it’s not 3 and -6, it’s 3-6. That’s what you wrote, that’s what it is.

No, dumbass, (3) -6 is the quantities 3 and -6 in the format (A)B. A format you go on to say is fine with zero reflection or recognition, because you’re experiencing this conversation one sentence at a time and putting absolutely zero thought into context or meaning.

I fucking hated teachers like you. You’re not listening. You’re just preaching.

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

multiplying by a parenthetical is different from distribution

Ok, let’s tweak it (I’ve practically never used RPN, but only took me a couple of minutes of research to work it out)…

1/2x3 same as 1 2 ÷ 3 x

https://programming.dev/pictrs/image/28660184-bcd6-4958-9241-e81f9b258e16.png

1/2(3) same as 1 2 3 x ÷

https://programming.dev/pictrs/image/cd7a28b6-87f9-4491-bc4b-77f2b7fea951.png

…and to bring it back to the original question…

8/2x(2+2)

https://programming.dev/pictrs/image/f246a865-4144-47bb-bb2a-1611886064cd.png

8/2(2+2)

https://programming.dev/pictrs/image/761f0462-09eb-4304-b25e-37212ffdbe4d.png

Learn something new every day, :-) and took me no time at all to debunk your claim that it’s not possible in RPN.

(3) -6 is the quantities 3 and -6 in the format (A)B

And what do you do with these “quantities”? Multiply them? If so then it’s exactly the same as A(B). If you’re talking about something else then tell me what you’re talking about.

zero thought

I managed to work out how to do distribution in RPN, something you claimed couldn’t be done, so who’s the one giving zero thought?

mindbleach, (edited )

If so then it’s exactly the same as A(B). If you’re talking about something else then tell me what you’re talking about.

I’m talking about how you said (A)B for A=3 B=-6 equals -3. By all means, tell me it’s because you read it as 3 - 6, because that’s my fucking point. The math is immutable. The syntax can be ambiguous.

I managed to work out how to do distribution in RPN, something you claimed couldn’t be done, so who’s the one giving zero thought?

You don’t understand the claim. No shit RPN can perform the individual steps of working through (A+B)C. But that equation does not exist in RPN. If you insist even (A+B)C is a different equation, then obviously ACBC*+ is a different equation. You can do the math for distribution, using RPN, but the concept of distribution does not exist within RPN.

You can’t have rules about parentheses in a notation that does not have parentheses.

What you did is only equivalent. In the exact same way that evaluating a parenthetical gets the same result as distribution. Because that part is math, not notation. And it doesn’t matter if you do the multiplication using repeated addition, or the Russian peasant method, or floating point, or whateverthefuck. The math doesn’t change… but many competing methods are equally valid.

SmartmanApps,
@SmartmanApps@programming.dev avatar

I’m talking about how you said (A)B for A=3 B=-6 equals -3

No, that’s not what I said, since that’s not what you said. You didn’t write (A)B where A=3 and B=-6, you wrote (3)-6, which is 3-6 (the brackets are redundant as they are 2 terms separated by an operator), which is -3. If you intended this to be interpreted as a single term then you should’ve written (3)(-6), which is -18. Alternatively, if you had written (3)6, that would be equal to 18, but you wrote (3)-6, which is 2 terms separated by a minus. You wrote (A)-B, not (A)B (or (A)(B)), and so I read it as (A)-B.

The syntax can be ambiguous.

No, it’s not. Now that I know what you mean, you just failed to write it the way you apparently intended - you didn’t follow the syntax rules for multiplying by a negative.

but the concept of distribution does not exist within in RPN

So what you’re really saying, as far as I can tell, is brackets themselves don’t exist in RPN.

evaluating a parenthetical gets the same result as distribution

Except when it doesn’t, which is my original point.

mindbleach,

So what you’re really saying, as far as I can tell, is brackets themselves don’t exist in RPN.

As far as you can tell. Really. Like it’s an oblique implication, and not the next sentence.

If this is the rate you absorb information when it’s repeatedly laid out in plain fucking English, I’m not sure we’ll live long enough for you to grasp why your original point was off-topic. Good day.

SmartmanApps,
@SmartmanApps@programming.dev avatar

As far as you can tell. Really. Like it’s an oblique implication

Indeed there was an oblique implication in me saying “as far as I can tell”, but you seemed to miss it (I was wording it in a polite way, rather than being downright rude like a lot of people in here seem to have no trouble with at all, but water off a duck’s back…).

your original point was off-topic

The OP was about an e-calculator giving the wrong answer, so I don’t see how explaining why it’s doing that is off-topic (in your view).

Good day

Bye now.

linuxdweeb,

This is best practice since there is no standard order of operations across languages. It’s an easy place for bugs to sneak in, and it takes a non-insignificant amount of time to debug.

SmartmanApps,
@SmartmanApps@programming.dev avatar

there is no standard order of operations across languages

Yes there is. The rules of Maths are universal.

It’s an easy place for bugs to sneak in

But that’s because of programmers not checking the rules of Maths first.

Synthead,
Zagorath,
@Zagorath@aussie.zone avatar

so far as I know, [BIDMAS] is a creation of some educator, who has taken conventions in real use, and extended them to cover cases where there is no accepted convention. So it misleads students; and moreover, if students are taught PEMDAS by rote without the proviso mentioned above, they will not even get the standard interpretation of a−b+c.

Absolutely rekt.

SmartmanApps,
@SmartmanApps@programming.dev avatar

math.berkeley.edu/~gbergman/misc/…/ord_ops.html

The rules of Maths that he manages to completely ignore.

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

The correct answer is 16. Multiplication and Division happen at the same level of priority, and are evaluated left-to-right.

bestnerd,

PEMDAS be damned?

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

PEMDAS should be read as Parentheses, Exponents, Multiplication and Division, Addition and Subtraction. There are four levels of priority, not six.

onion,

No it’s ambiguous, you claiming there is one right answer is actually wrong.

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

It is not ambiguous at all, there absolutely is one right answer, and it is 16.

Primarily0617,

You're taking something you learned when you were like 9 years old and assuming it's correct in every situation forever.

Unfortunately this isn't the case and you're incorrect.

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

Inaccurate, this has nothing to do with the mnemonic PEMDAS, this has to do with the actual order of operations it tries to instill. That order of operations is not ambiguous, there is a correct way to solve simple equations like the one above, and there is one and only one correct answer to it. That answer is 16.

Primarily0617, (edited )

And in the "actual" order of operations, if we want to pretend one exists, 2( binds more tightly than ÷

if you're going via prescriptivism, then you're wrong, because there are plenty of authoritative sources following the left hand model

if you're going via descriptivism, then you're wrong, because this thread exists

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

No, 2( does not bind more tightly than ÷. 2( is simply 2×(…, and ÷ and × occur at the same level of priority. After resolving the addition in the parentheses, the remaining operations are resolved left to right.

Primarily0617,

if you're going via prescriptivism, then you're wrong, because there are plenty of authoritative sources following the left hand model

if you're going via descriptivism, then you're wrong, because this thread exists

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

No, the fact that a good many people are incorrect about how math works does not entail that math is an open question. It’s not, math has actual rules to its equations and an unambiguous right answer. In this case, that answer is 16.

Primarily0617,

math has actual rules to its equations and an unambiguous right answer

you know you could've just started this by admitting you've never touched the subject at a higher level than high school and saved us all this bother

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

I’m well familiar with math and the rules by which it works. Those who persist in arguing the case here could save the rest of us the bother by admitting they were stumped by a simple gotcha equation and are embarrassed, rather than wasting everyone’s time by insisting that math is nothing but a lawless, rules-free wasteland where the answer to an equation depends on your feelings at the time.

Primarily0617,

I’m well familiar with math and the rules by which it works

i know you won't realise this because you never got past basic calculus, but this is a very funny statement to anybody that did

they know all the "math rules" guys. which ones? ALL of them

but okay these rules: where do they come from, then?

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

Fortunately, the rules necessary to resolve the equation in this post are extremely elementary, so none of what you’re referencing has any bearing whatever.

There are exactly three things to consider in here to determine priority: parentheses, multiplication/division, and addition. The addition happens first due to the parentheses, and the remaining is evaluated left-to-right. The only correct answer here is 16.

All your deflection from your embarrassment at misreading a simple equation doesn’t detract from this.

Primarily0617,

Fortunately, the rules necessary to resolve the equation in this post are extremely elementary, so none of what you’re referencing has any bearing whatever.

this would be like trying to tell a chemical engineer they didn't know what they were doing based on your understanding of the atom as a ball of protons with electrons wooshing round it like they were moons

very cute

unfortunately, if you give the expression 1 / 2x to anybody who knows what they're doing they'll interpret it as 1 / (2x) because it would be absurd not to

for reference, that's why the calculator works like this. because it's a tool designed primarily for people who actually know what they're doing with numbers, so it works how they expect it to work

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

And there you’ve proven exactly what I’ve been saying all along. 2x works the way it does because there’s a variable involved, and natural reading of that treats it as a single entity. There are no variables in the equation in the post, there are only definite numbers, parentheses, and simple mathematical operations. 8/2(2+2) is nothing more than 8/2×(2+2). There is nothing special about 2(…, this is not the equivalent of 2x.

Primarily0617,

a natural reading of 2(2+2) treats it as the same

you're straight up just spouting contradictory nonsense now because you've realised your stance doesn't make any sense, and i am very much here for it

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

No, what I’m explaining to you is the facts behind what every calculator with any modicum of computing power will tell you, namely that 2(2+2) is identical to 2×(2+2).

Primarily0617,

ah yes it's the computing power that's at issue here

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

Yeah, kind of. The crappier calculator is the one generating the incorrect answer. Any calculator with any real level of oomph behind it can parse this correctly to get the correct answer, 16.

Primarily0617,

the good calculator is the one showing you adverts

~ local galaxy brain

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

The good calculator is the one using the processing power of the phone to handle the programming necessary to correctly interpret the order of operations and arrive at the correct answer, whereas the bad calculator - despite having no ads - is a cheap piece of trash unable to contain the necessary computational logic to arrive at the correct answer.

Primarily0617,

try again

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

No need. The fact that you’re incapable of comprehending it at this point indicates that any further attempts to explain it to you are equally likely to fall on deaf ears.

Primarily0617,

you're boring now ;(

LopensLeftArm,
@LopensLeftArm@sh.itjust.works avatar

And you’ve long since given up trying to defend your incorrect position, so I can only assume that you’re childishly continuing in an attempt to get the last word. That’s fine, go right ahead and have the last word, I won’t reply further since it’s that important to you.

Primarily0617,

😘

SmartmanApps,
@SmartmanApps@programming.dev avatar

The crappier calculator is the one generating the incorrect answer

Which would be the app written by the programmer who didn’t check his Maths was correct, as opposed to the calculator made by a company who, you know, makes calculators.

SmartmanApps,
@SmartmanApps@programming.dev avatar

2x works the way it does because there’s a variable involved, and natural reading of that treats it as a single entity

Just like 2(2+2) is also a single Term.

no variables in the equation in the post, there are only definite numbers

Pronumerals literally stand in for numerals, and work exactly the same way. There is nothing special about choosing a pronumeral to represent a numeral.

https://programming.dev/pictrs/image/4752dec1-c37c-4228-8625-c72e7521e745.jpeg

8/2(2+2) is nothing more than 8/2×(2+2).

They’re completely different actually. 2(2+2) is a single term in the denominator, (2+2) - which you separated from the 2 with an x - is a now 3rd term which is now in the numerator, having been separated from the 2 which is in the denominator.

There is nothing special about 2(…, this is not the equivalent of 2x

So what’s it equal to when x=2+2?

SmartmanApps,
@SmartmanApps@programming.dev avatar

2( is simply 2×(

No it isn’t. 2(a+b)=(2a+2b) The Distributive Law

SmartmanApps,
@SmartmanApps@programming.dev avatar

But there actually is only 1 right answer, and unfortunately for the person you’re replying to it’s 1.

kzhe,
cupcakezealot,
@cupcakezealot@lemmy.blahaj.zone avatar

pink tax strikes again

Sylvartas,

This is why I loved my Casio 2D. It could use actual fractions to avoid these kind of issues

cRazi_man,

Ah damn it. It took me ages to find a calculator app that fits my needs… And now I find out it works like the one on the right.

MeanEYE,
@MeanEYE@lemmy.world avatar

HP Prime, king of all. Or if you prefer open source NumWorks.

DrDominate,
@DrDominate@lemmy.world avatar

Hiper Calc is the calculator app that I use. It’s very good. When I ran this equation, it actually notified me how the operands should be grouped (weak or strong) and provided two answers. Honestly the whole issue can be avoided if you use more parentheses

SmartmanApps,
@SmartmanApps@programming.dev avatar

the whole issue can be avoided

…by following all the order of operations rules

Razzazzika,

… the one on the right is correct… that’s a jank ass calculator on the left that doesn’t know how to do order of operations 8/2×(2+2) 8/2x4 4x4 16

force, (edited )

There isn’t a multiplication symbol though. By your logic something like 8÷2x would mean (8÷2)*x because order of operations

Or if you read 8÷2√x as (8÷2)*√x

Just notate 8÷2(2+2) as 8÷2x; x=(2+2) and you get it, you can substitute any complete expression with a variable in an equation and the logic stays the same.

Eezyville,
@Eezyville@sh.itjust.works avatar

You know sometimes both are correct.

SmartmanApps,
@SmartmanApps@programming.dev avatar

You know sometimes both are correct

Nope. That’s what the order of operations rules take care of.

SmartmanApps,
@SmartmanApps@programming.dev avatar

the one on the right is correct

No, it isn’t.

8/2×(2+2)

…isn’t the same thing as 8/2(2+2). You separated the term in the denominator, leading the (2+2) to get flipped into the numerator, hence wrong answer.

Razzazzika,

That would be 8/(2x(2+2)) if we were keeping it all in the denominator. Multiplication happens in the numerator if there are no parenthesis to distinguish it. If thr equation was written like this:

8


2x(2+2)

Then you would also be correct, but I have to respectfully disagree with your analysis.

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

That would be 8/(2x(2+2)) if we were keeping it all in the denominator

(2x(2+2)) is the same thing as 2(2+2)

I have to respectfully disagree with your analysis

Which means you disagree with how Maths textbooks teach how to do this (see previous link).

Buffaloaf,

Just write it out as a fraction and avoid all the confusion

hallettj,
@hallettj@beehaw.org avatar

This is exactly why we have Reversed Polish Notation. When will people learn?

millie,

A fifteen year old version of myself somewhere inside just screamed in iptscrae induced frustration.

groucho,
@groucho@lemmy.sdf.org avatar

RPN Gang unite!

GTG3000,

I’m with the right answer here. / and * have same precedence and if you wanted to treat 2(2+2) as a single unit, you should have written it like (2*(2+2)).

sushibowl,

It’s pretty common even in academic literature to treat implied multiplication as having higher precedence than explicit multiplication/division. Otherwise an expression like 1 / 2n would have to be interpreted as (1 / 2) * n rather than the more natural 1 / (2 * n).

A lot of this bullshit can be avoided with better notation systems, but calculators tend to be limited in what you can write, so meh. Unless you want to mislead people for the memes, just put parentheses around things.

GTG3000,

That’s fair. Personally, I just have a grudge against math notation in general. Makes my programmer brain hurt when there’s no consistency and a lot of implicit rules.

Then again, I also like Lisp so I’m not exactly without sin.

AngryCommieKender,

As a musician, can I just say: I would give my right nut for a musical notation system that is as clearly defined as mathematical notation. The worst part is that everyone that attempts to fix musical notation, just creates a new standard of notation.

m.youtube.com/watch?v=Eq3bUFgEcb4

GTG3000,

I know what video you linked even without clicking lol. Yeah, I can agree there. Although my only experience with music was “try to learn guitar, get distracted because ADHD”.

AngryCommieKender,

I started with piano, technically, but I was 3-4 years old, and don’t remember any of it. I can sit a piano and make it sound good, but I can’t play sheet music on it. I switched to violin in second grade, and then just learned how to play everything except for rhythm guitar, and piano. Chords mess with my fingers. Strangely enough my ADHD allowed me to super focus, but I never got the hang of sight reading, so I mostly play by ear, but no one can tell.

I can even play a didgeridoo, and that required me to learn circular breathing.

GTG3000,

That’s impressive!

My ADHD just makes me lose time. Blink and the day is just gone.

Jarix,

The rocksmith game might help you.

Even guitarhero/rockband will help you with using your fingers and will help when you want to try a real guitar. Muscle memory might not be great but for someone who is just doing it for fun it will be helpful getting your fretting and strumming coordination. And them being games might help fend off the adhd enough to keep you motivated to pick it up again after putting it down

GTG3000,

I appreciate the sentiment, but I really don’t have time for another hobby.

I did accidentally become a DM for not one but two DnD groups recently.

SmartmanApps,
@SmartmanApps@programming.dev avatar

Makes my programmer brain hurt when there’s no consistency and a lot of implicit rules.

All the order of operations rules of Maths are explicit

Ultraviolet,

The problem is whether or not that rule is taught depends on when and where you learned it. Schools only started teaching that rule relatively recently, and even then, not universally. Which of course makes for ideal engagement bait on your hellsite of choice.

SmartmanApps,
@SmartmanApps@programming.dev avatar

Schools only started teaching that rule relatively recently

Recently? The order of operations rules have been taught for more than a century (we can see them in Lennes’ letter).

Ultraviolet,

Order of operations in general, yes. Implied multiplication coming before explicit multiplication/division is what’s recent.

SmartmanApps,
@SmartmanApps@programming.dev avatar

Implied multiplication coming before explicit multiplication/division is what’s recent.

  1. “implicit multiplication” is not taught, because there’s no such thing as implicit multiplication
  2. the “controversy” over it isn’t recent either - we can see Lennes complaining about it more than 100 years ago! The more things change the more they stay the same (sigh).
SmartmanApps,
@SmartmanApps@programming.dev avatar

I’m with the right answer here

Apparently not.

if you wanted to treat 2(2+2) as a single unit

Yes, it is a Term subject to The Distributive Law, written just the way it is.

linuxdweeb,

Please Excuse My Dear Aunt Sally, she downloaded a shitty ad-infested calculator from the Google Play store.

Empathy,

Unfortunately, it’s the best calculator I could find so far (for my own needs). I paid to remove the ads though, ads bother me way too much to use something infested with them.

PM_ME_VINTAGE_30S,

If you’re willing to pirate (or legally generate) a TI calculator ROM, then Graph 89 is probably what you’re looking for. This is what I use as my daily driver calculator with a TI-89 ROM.

MilliaStrange,

https://beehaw.org/pictrs/image/c3d6dbc8-75e9-4aea-8b02-d7db0c60570a.webp

Graph 89 with my TI-84 Plus Silver yields the bad answer

shea,

wabbitemu!!! Its literally a ti emulator

brlemworld,

The calculator is correct

Pharmacokinetics,
@Pharmacokinetics@lemmy.world avatar

People keep debating over this stuff. I have a simpler solution. Math is not real.

Goodvibes,

The only real answer lmao. People really out here thinking the funny symbols on the paper follow absolute laws. Crazy.

SmartmanApps,
@SmartmanApps@programming.dev avatar

thinking the funny symbols on the paper follow absolute laws

They do. Maths is universal, just like the laws of Physics (which are often written using Maths BTW).

AdrianTheFrog,
@AdrianTheFrog@lemmy.world avatar

My mom’s a mathematician, she got annoyed when I said that the order of operations is just arbitrary rules made up by people a couple thousand years ago

tamal3,

It’s organized so that more powerful operations get precedence, which seems natural.

Set aside intentionally confusing expressions. The basic idea of the Order of Operations holds water even without ever formally learning the rules.

If an addition result comes first and gets exponentiated, the changes from the addition are exaggerated. It makes addition more powerful than it should be. The big stuff should happen first, then the more granular operations. Of course, there are specific cases where we need to reorder, or add clarity, which is why human decisions about groupings are at the top.

Mango,

Yeah, but that’s why I like to buff my base attack before I invest in multipliers and armor penetration!

SmartmanApps,
@SmartmanApps@programming.dev avatar

The big stuff should happen first, then the more granular operations

The “big stuff” is stuff that is defined in terms of something else. i.e. exponents are shorthand for repeated multiplication… and multiplication is shorthand for repeated addition, hence they have to be done in that order or you get wrong answers.

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

“Wrong answers” only according to our current order of operations, math still works if you, for example, make additions come first (as long as you’re consistent about it).

OFC it is a convention and to change it you would have to change all expressions ever written all at the same time, to avoid confusion between competing standards. I’m not arguing that it should be changed, only that there is no ‘high truth’ behind it.

SmartmanApps,
@SmartmanApps@programming.dev avatar

“Wrong answers” only according to our current order of operations

No, according to arithmetic.

math still works if you, for example, make additions come first

No, it doesn’t - order of operations proof. The only way it could work with addition first is if we swapped the definitions of addition and multiplication around… but then we still have the same order of operations, all we’ve done is swapped around what we call addition and multiplication!

there is no ‘high truth’ behind it.

There is when it comes to order of operations.

AdrianTheFrog,
@AdrianTheFrog@lemmy.world avatar

Let’s assume for a minute addition comes first. We know 2+3 is 5, and 5x4 is the same as 5+5+5+5=20. What is the issue with that?

SmartmanApps,
@SmartmanApps@programming.dev avatar

5+5+5+5=20. What is the issue with that?

That it’s wrong. If I have 1 2 litre bottle of milk, and 4 3 litre bottles of milk - i.e. 2+3x4 - how many litres of milk do I have? Without even doing the arithmetic, just count it up and tell me how many litres there is.

AdrianTheFrog,
@AdrianTheFrog@lemmy.world avatar

If we change how equations are parsed so addition comes before multiplication, 2+3x4 is not the equation required to solve that problem. 2+(3x4) is the equation needed. You can’t change how equations work and then expect all equations to work the same after the change.

If your argument is that this will add parentheses where we didn’t need them before, that’s valid and its the reason we do it this way in the first place. But that doesn’t mean there is anything fundamentally wrong with having a different system of writing equations in which operations are executed in a different order.

Our whole system of writing equations is just a convention, and yes, it is a good and easy to understand and use way of writing math. But there is no fundamental truth behind it, only that it is simpler for the majority of use cases.

SmartmanApps,
@SmartmanApps@programming.dev avatar

Noted that you didn’t answer my question - the answer is I have 14 litres of milk. 2+3+3+3+3=14 litres. When you did “arbitrary addition first”, you got 20, which is wrong, which is why no other order of operations rules work than the ones we have.

You can’t change how equations work and then expect all equations to work the same after the change

In actual fact the point is that they will except for what ever your new notation is. e.g. if we instead defined + to mean multiply, and x to mean add, then we would do + before x, and again, that would be the only order of operations which works. i.e. the only order which gives us 14 litres.

that doesn’t mean there is anything fundamentally wrong with having a different system of writing equations in which operations are executed in a different order

No, and if you did that, you would again arrive at only one order of operations rules which works, cos I still have 14 litres, and the Maths in this new system still has to give an answer of 14 litres, not 20.

Our whole system of writing equations is just a convention

Nope, it’s all rules, found in any Maths textbook, and if you don’t obey the rules you get wrong answers (like you did when you got 20).

But there is no fundamental truth behind it

Yes there is - I have 14 litres, and only 1 set of order of operations rules gives that answer.

only that it is simpler for the majority of use cases

If you follow the rules of Maths then it is correct for every use case. That’s why they exist in the first place.

AdrianTheFrog,
@AdrianTheFrog@lemmy.world avatar

I think you misunderstand my argument. I could use still math to solve a real-world problem with an altered order of operations. You could still do anything you can do with regular math, if you had a different order of operations. You could make a programming language that parses your inputted expressions with a different order of operations and still use it to calculate collisions or render a 3d scene or do anything else that involves math. Do you need me to calculate something, to prove it to you?

The order of operations is just part of a system of notation and any system of notation that exists in the world is inherently arbitrary. The same way the way that how we draw the number 3 or the number 5 has no inherent meaning behind it other than the convention of how we interpret it, the order of operations is nothing more than a standard part of the notation. Again, I’m not saying that we should or could change it, as there would be no way to indicate which convention we are using and the standard order of operations works perfectly fine.

SmartmanApps,
@SmartmanApps@programming.dev avatar

I think you misunderstand my argument

No, you demonstrably didn’t understand mine, which is, what you are saying is impossible, but you’re still saying it’s possible.

I could use still math to solve a real-world problem with an altered order of operations

No, you can’t. You already tried to do addition first in 2+3x4 and found out why it doesn’t work. Ever since then you’ve been ignoring that result and pretending that there’s some other way to make it work. No, there isn’t. As long as multiplication is defined in terms of addition (i.e. 3x4=3+3+3+3) then it’s impossible to get a right answer unless you do multiplication before addition.

You could still do anything you can do with regular math, if you had a different order of operations

No, you can’t. Again, you already proved you can’t.

Do you need me to calculate something, to prove it to you?

Go ahead - I’m not holding my breath. I already told you why it literally can’t work. But note that adding brackets isn’t changing the order of operations - brackets are already part of the order of operations. Writing 2+3x4 as 2+(3x4) is exactly the same thing.

BTW just to FURTHER prove your “addition first” doesn’t work, look at this example…

3x4+2=3x6=18. But earlier you did 2+3x4=5x4=20 - not even the same answer in an “addition first” world! Welcome to why it’s impossible to make addition-first work. But knock yourself out - you’re welcome to try! 😂

The order of operations is just part of a system of notation

No, it isn’t. It’s part of the rules of Maths. Notation is how you write it - underlying that is how Maths actually works. This is embodied in the rules of Maths.

is inherently arbitrary

Completely fixed, and a result of the way the operators are defined - that was the only “arbitrary” bit, deciding what the operators were and what they were going to mean, but once you did that then the order of operations rules were already written for you (having already been determined as soon as you made the definitions of the operators in the first place).

number 5 has no inherent meaning behind it other than the convention of how we interpret it

Again, not a convention, a rule of how to interpret it. You can’t just decide to interpret 5 as four, or again, you end up with wrong answers. The rules of Maths prevent you from getting wrong answers. You found that out yourself when you tried to do addition first in 2+3x4.

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

the number 5 has no inherent meaning behind it other than the convention of how we interpret it

Again, not a convention, a rule of how to interpret it. You can’t just decide to interpret 5 as four, or again, you end up with wrong answers. The rules of Maths prevent you from getting wrong answers. You found that out yourself when you tried to do addition first in 2+3x4.

It’s only a wrong answer if you use the same expression you would with the standard order of operations. And I’m not saying we can randomly start interpreting 5 as four, just that there is no law of the universe that makes 5 look like that, and we could theoretically (not practically ofc) switch the definitions of the symbols 5 and 4 if we did it all at once and revised old math expressions to match the new standard. Just as there is no reason the letters “bike” mean what they do other than that’s what someone decided to call it, there is no reason the order of operations is what it is other than that is how someone decided to write it.

Scratch doesn’t even have an order of operations. You can still do math in it.

I’m not saying you can take any expression and get the same answer by doing addition before multiplication. I’m saying you can take any problem and get the correct answer by doing addition before multiplication. In your milk example, that means I would use the expression 2+(3x4) because 2+3x4 is no longer the correct expression needed to solve the problem.

(For an example of my distinction of the words “expression” and “problem”, “(4x)+2” is an expression, and “I start with 2 litres of milk. For every dollar I spend, I get 4 more liters of milk. How much milk do I have?” is a problem.)

My argument also relies on a distinction between the language of modern math and the concept of doing math, defining math as the dictionary definition of “The study of the measurement, properties, and relationships of quantities and sets, using numbers and symbols”. As you can see, this makes no mention of the notation commonly used in math. All I am saying is that you can still use numbers to solve problems with an altered order of operations, or by altering any part of the system of notation.

Perhaps seeing how I could solve a problem with a different order of operations will help illustrate my argument:

Problem: 2 cars approach an interchange at a 90 degree angle to each other. Car A approaches the station from 15 meters away at 30 meters/second and Car B approaches the station from 50 meters away at 20 meters/second. How fast is the distance between the cars decreasing?

https://lemmy.world/pictrs/image/a01d746a-6df5-4a57-b602-e03afe743a81.jpeg

Answer: the rate of change of the distance between the cars is approximately -27.777 meters per second.

As you can see, I used my altered math notation to find the correct answer. I can still solve a real-world problem with this notation, but the same expressions you would use before may not work now.

SmartmanApps,
@SmartmanApps@programming.dev avatar

It’s only a wrong answer

Really? You want to do that again? Ok, fine… If I have 1 2 litre bottle of milk, and 4 3 litre bottles of milk - i.e. 2+3x4 - how many litres of milk do I have?

you would with the standard order of operations

The definition of 5 as being 1+1+1+1+1 has nothing to do with order of operations.

there is no law of the universe that makes 5 look like that

No, but there is a rule of Maths which defines it.

switch the definitions of the symbols 5 and 4 if we did it all at once and revised old math expressions to match the new standard

In other words everything would be the same as now but we just switched the notation around. I already said that to you a while back. Now you’re getting it.

there is no reason the order of operations is what it is other than that is how someone decided to write it

Got nothing to do with how it’s written - Maths is written differently in many different countries, and yet the underlying order of operations rules are universal.

I’m not saying you can take any expression and get the same answer by doing addition before multiplication

And if it’s not the same answer then it’s wrong. You’re nearly had it.

I’m saying you can take any problem and get the correct answer by doing addition before multiplication

And I told you you can’t. Waiting on a proof from you. Start with 2+3x4 - show me how you can get the correct answer by doing addition first - it’s a nice simple one. :-)

that means I would use the expression 2+(3x4) because 2+3x4

They’re literally the same thing.

All I am saying is that you can still use numbers to solve problems with an altered order of operations, or by altering any part of the system of notation

And I told you that it’s impossible. Changing the notation doesn’t change the Maths.

As you can see, I used my altered math notation to find the correct answer

BWAHAHAHAHA! Nope! I see you putting brackets around the multiplication to make sure it gets done first - same as if you hadn’t used brackets at all! It’s the exact same notation we use now, just with some redundant brackets added to it! And, predictably, you left the addition for last.

Ok, let’s take your example and do addition first (like you claimed can be done)…

15²+50²=15x15+50x50=15x65x50=48,750. But 15²+50² is 2,725 according to my calculator. Ooooh, different answers - I wonder which one is right… I wonder which one is right…???

Thanks for proving it can only be done by following the order of operations rules (just like I’ve been saying to you all along). Bye now.

AdrianTheFrog,
@AdrianTheFrog@lemmy.world avatar

I"m beginning to wonder if you are willfully misunderstanding my point. Or perhaps you have sunk so much time into this argument you assume I must be wrong. Take another look at my third and fifth paragraphs. I promise, I am not trying to say what you think I’m trying to say.

I see you putting brackets around the multiplication to make sure it gets done first - same as if you hadn’t used brackets at all! It’s the exact same notation we use now, just with some redundant brackets added to it! And, predictably, you left the addition for last.

All I did was use the expression necessary to evaluate correctly with the altered order of operations. There are, in fact, times when you can remove brackets that you would otherwise need, for example (x+4)(x-2) would no longer need brackets. The fact that “old” expressions often have to be written with new brackets to evaluate correctly with an altered order of operations is something I fully understand. The presence of brackets where there would be none otherwise does not invalidate my point.

15²+50²=15x15+50x50=15x65x50=48,750. But 15²+50² is 2,725 according to my calculator. Ooooh, different answers - I wonder which one is right… I wonder which one is right…???

What? I never wrote 15²+50². That is an expression you copied incorrectly. Your incorrectly copied expression has little relevance to the problem at hand.

Ok, fine… If I have 1 2 litre bottle of milk, and 4 3 litre bottles of milk - i.e. 2+3x4 - how many litres of milk do I have?

If we were doing math with an altered order of operations, the expression 2+3x4 is just simply wrong. 2+(3x4) is the expression you need. If you try to do math the same as it is with the regular order of operations, it will not work. But that does not mean math with an altered order of operations is useless. It is still math. It can still be used to “study of the measurement, properties, and relationships of quantities and sets using numbers and symbols”.

I fully understand that to correctly evaluate an expression written with a certain order of operations in mind, you need to use that order of operations. If someone wrote an expression with a different order of operations in mind, you could solve it with a different order of operations and still get what the author of the expression intended. For example, I write the equation a+2xa-2 with my order of operations, expecting you to use the same order of operations, and tell you to simplify. If you get 3a-2, that is wrong, because you used an order of operations different than the one I intended to be used to solve the problem. Imagine, for a moment, an alternate universe where everyone uses a different order of operations and a+2xa-2 simplifies to a^2-4. All I am trying to say is that that their math, with a different order of operations, would be no less useful then our math.

In summary, my only claim is that you can still use a different order of operations to manipulate numbers and solve real world problems.

Waiting on a proof from you.

I wrote and evaluated all of those expressions in my last comment with a different order of operations in mind, and was still able to come to the correct answer.

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

I wasn’t going to reply any more, but I see now you don’t understand terms either, so one more time for old time’s sake (and maybe you might finally get it)…

perhaps you have sunk so much time

You know teachers don’t get paid for helping students outside class time right?

assume I must be wrong

No assumption needed. What you are proposing is literally impossible. I’ve been saying that all along.

Take another look at my third and fifth paragraphs.

Ok…

I’m not saying you can take any expression and get the same answer by doing addition before multiplication

And so far you haven’t been able to show it works for any expression at all! Not even one expression! Just like I said would happen.

All I am saying is that you can still use numbers to solve problems with an altered order of operations

And I said you can’t, and you haven’t! All you did was put brackets around the multiplication to make sure we were still following the only order of operations that works! You have still not shown an actual instance where one can actually do addition first and get a right answer, not one! The idea that one could use addition first as an “alternate order of operations” is thus pure fantasy, just like I’ve been saying all along. It’s literally impossible.

for example (x+4)(x-2) would no longer need brackets

Yes it would! (x+4) is one term - that’s what the brackets means - “these things are all together”. If you remove that, because “addition first”, it’s now two terms, so the whole expression is two terms (instead of one), x, and 4(x-2) (which is a mistake people make when they write 8/2(2+2) as 8/2x(2+2) - just turned 2 terms into 3 terms and changed the answer!). Every example you’ve done so far you’ve used brackets to escape from having to do addition first, and the very same thing would therefore apply here - no brackets, no escaping “addition first” approach, brackets before addition leads to x+4(x-2)=x+(4x-8) =5x-8, which is not the product of (x+4) and (x-2).

The presence of brackets where there would be none otherwise does not invalidate my point

No, the fact that you’ve not been able to show a single instance of where addition before multiplication would work does. You can’t show “a way to solve this in an addition first world” when it’s literally impossible for an “addition first world” to exist in the first place.

I never wrote 15²+50²

https://programming.dev/pictrs/image/edc69c83-8236-41bd-905f-25b424486f99.png

…and I removed the brackets to show that addition first doesn’t work (since you keep putting in brackets to revert “addition first” back to the only order of operations that actually works).

It can still be used to “study of the measurement, properties, and relationships of quantities and sets using numbers and symbols”

And you’ve still not shown how. Every example you’ve used so far you’ve put in brackets to your (supposed) “addition first” so that we were evaluating it using the only order of operations that works. In other words, no, you can’t use “addition first” to “study of the measurement, properties, and relationships of quantities and sets using numbers and symbols” - you used the regular order of operations to do it! You haven’t shown a single example of where addition first could be used to do it.

you need to use that order of operations

You need to use an order of operations that gives a correct answer, of which there is only one - a fact you keep trying to avoid.

different order of operations and a+2xa-2 simplifies to a^2-4

No it wouldn’t, cos now you’re ignoring terms as well. As per my earlier working out, it would simplify to 5x-8 unless you also changed the definition of terms. Do you see yet why it’s impossible to have an “alternate order of operations”?

All I am trying to say is that that their math, with a different order of operations, would be no less useful then our math

And you’ve completely failed to show a single instance where this is true - which is what I’ve been saying all along, it’s impossible to have another set of order of operations that works. You keep pre-supposing it’s possible, but then add brackets to the multiplications so that we follow the actual correct order of operations, the only order of operations that works.

my only claim is that you can still use a different order of operations to manipulate numbers and solve real world problems

And you’ve still failed to solve a single problem using addition first, because it’s still a fact it’s literally impossible to do so.

was still able to come to the correct answer

by using the only order of operations that works. i.e. multiplication before addition.

Now I really am done - I’m not going any further down this rabbit hole of whatever other Maths you may not understand either (this post it was Terms - who knows what’s next)…

SmartmanApps,
@SmartmanApps@programming.dev avatar

My mom’s a mathematician, she got annoyed when I said that the order of operations is just arbitrary rules made up by people a couple thousand years ago

I’m not surprised. Here’s the proof of the order of operations rules. Also, the equals sign wasn’t invented until the 16th century, so only 500 years old at most (the earliest references to order of operations are over 400 years ago).

AdrianTheFrog,
@AdrianTheFrog@lemmy.world avatar

That proof for the order of operations sure seems to rely a lot on our current order of operations…

SmartmanApps,
@SmartmanApps@programming.dev avatar

That proof for the order of operations sure seems to rely a lot on our current order of operations

Doesn’t use order of operations at all. It only uses the definitions of the operators. i.e. 3x4=3+3+3+3 by definition. i.e. nothing to do with order of operations.

If I have 1 2l bottle of milk, and 4 3l bottles of milk, how many litres of milk do I have? It can be solved by simply adding them up - again, nothing to do with order of operations here, just simple addition. Now, write it out as a mathematical expression which uses multiplication, and tell me which order of operations gets you the right answer. Voila! Welcome to how we worked out what the order of operations rules had to be.

AdrianTheFrog,
@AdrianTheFrog@lemmy.world avatar

2+(4x3) gives the right answer, with addition coming before multiplication

SmartmanApps,
@SmartmanApps@programming.dev avatar

2+(4x3) gives the right answer, with addition coming before multiplication

If we rewrote all of Maths so that addition came before multiplication, then no, 2+3x4 would no longer mean what it does now (because + and x would have to mean something different to what they do now in order for the order to be swapped). The order of operations rules come directly from the definitions. You can’t just say “we’ll do addition first” without having defined what addition is now, nor multiplication. In a world where addition comes before multiplication, that means multiplication is no longer shorthand for addition (because that’s the very thing which means we have to do multiplication before addition, so it can’t be true anymore if now we’re doing addition first).

Let’s take an imaginary scenario where we now use x for add, and + for multiply. That would indeed mean that + has to be done before x, but note that + now means multiply. That means your “addition first” 2+(3x4) is what we currently mean by 2x(3+4) which is 14. Now take away the brackets (since I don’t use brackets when adding up the milk! Just 2+3x4). Your addition-first 2+3x4 is equivalent in our multiplication-first world to 2x3+4 which equals 10 - the wrong answer! So now you’ve created a world where we have to add brackets to things just to get the right answer! Why would you even want to do that when it works the way it is? The whole point to having order of operations rules is to not have to add brackets!

FlyingSquid,
@FlyingSquid@lemmy.world avatar

I’m with you. Has anyone ever actually seen a math? Can you buy a math at the math store? Are there bespoke math craftspeople?

No.

I rest my case.

tal,
@tal@lemmy.today avatar

“Math” is a mass noun. You can’t have “a math”. It’s like blood or love. You can have more blood or less blood. There might be units in which blood is measured that you can have a certain number of (“a gallon of blood”), but you can’t have, unqualified, a blood or two bloods (well, not in that sense of the word, anyway).

FlyingSquid,
@FlyingSquid@lemmy.world avatar

You know this is 196, right?

pinkdrunkenelephants,

You know we are adults who live in the real world, right?

FlyingSquid,
@FlyingSquid@lemmy.world avatar

I don’t think you understand the concept of shitposting.

SmartmanApps,
@SmartmanApps@programming.dev avatar

You can’t have “a math”

No, you have a branch of Mathematics.

eupraxia,
@eupraxia@lemmy.blahaj.zone avatar

Is math in the room with us right now?

sunbather, (edited )

8÷2(2+2)=2(2+2)÷2(2+2)

alternatively if 8÷2(2+2)=16 that means 2(2+2)=8÷16 in other words 8=0,5 which it isnt

rasensprenger, (edited )

your first line is correct, but while it looks like 1 (and it might be under different conventions), evaluating according to standard rules (left to right if not disambiguated by pemdas) yields

2(2+2)/2(2+2) = 2(4)/2(4) = 24/24 = 8/24 = 44 = 16

Using implicit multiplication in quotients is weird and really shouldn’t happen, this would usually be written as 8/(2*(2+2)) or 8/2*(2+2) and both are much clearer

Your second argument only works if you treat 2(2+2) as a single “thing”, which it looks like, but isn’t, in this case

sunbather, (edited )

not much to refute in the argument of whether its 16 or 1 as its all a matter of convention in the end and ultimately the root of the argument is poor formatting of the expression, im used to implicit multiplication taking precedent and that 2(2+2)===2*(2+2) and that for my first argument having the same expression on 2 sides of a division sign automatically equals 1, but how come you find implicit multiplication in quotients weird? seeing as it happens literally all the time in equations, unless thats a difference in school systems or similar im unaware of

for fun also rewrote the expression into powers of 2 and indeed depending on how you go about implicit multiplication i end up with either 2⁰ or 2⁴, so for the sake of sanity i figure its best to just say x₁=1; x₂=16

rasensprenger,

It’s weird because usually the people writing the expressions want to communicate clearly, and stuff like 1/2x is not immediately clear to everyone, so they write the 1/2 as a fraction.

The same expression on both sides of the division sign only reduce to one if they actually bind to the division sign, which is rarely an issue, but that is exactly the thing that is in question here. I think it’s clear that 1 + 1/1 + 1 is 3, not 1, even though 1+1 = 1+1.

But as you said, of course, the evaluation order is just convention, you can just as well write everything in en.m.wikipedia.org/wiki/Reverse_Polish_notation

Chakravanti,

Let’s ask a neutron and find out which…

  • All
  • Subscribed
  • Moderated
  • Favorites
  • 196@lemmy.blahaj.zone
  • DreamBathrooms
  • InstantRegret
  • GTA5RPClips
  • magazineikmin
  • mdbf
  • rosin
  • Youngstown
  • khanakhh
  • everett
  • slotface
  • thenastyranch
  • osvaldo12
  • kavyap
  • ngwrru68w68
  • JUstTest
  • ethstaker
  • modclub
  • cubers
  • cisconetworking
  • Durango
  • tacticalgear
  • tester
  • normalnudes
  • Leos
  • megavids
  • provamag3
  • anitta
  • lostlight
  • All magazines