Comment on I dunno
SmartmanApps@programming.dev 4 days agoI mean, arithmetic order is just convention
Nope, rules arising from the definition of the operators in the first place.
not a mathematical truth
It most certainly is a mathematical truth!
But that convention works in the way we know, yes, because that’s what’s… well… convention
The mnemonics are conventions, the rules are rules
SkyeStarfall@lemmy.blahaj.zone 4 days ago
The rules are socially agreed upon. They are not a mathematical truth. There is nothing about the order of multiple different operators in the definition of the operators themselves. An operator is simply just a function or mapping, and you can order those however you like. All that matters is just what calculation it is that you’re after
SmartmanApps@programming.dev 4 days ago
Nope! Universal laws.
Yes they are! 😂
That’s exactly where it is. 2x3 is defined as 2+2+2, therefore if you don’t do Multiplication before Addition you get wrong answers
Image
No you can’t! 😂 2+3x4=5x4=20, Oops! WRONG ANSWER 😂
And if you want the right answer then you have to obey the order of operations rules
SkyeStarfall@lemmy.blahaj.zone 4 days ago
That’s a very simplistic view of maths. It’s convention en.wikipedia.org/wiki/Order_of_operations
Just because a definition of an operator contains another operator, does not require that operator to take precedence. As you pointed out, 2+3*4 could just as well be calculated to 5*4 and thus 20. There’s no mathematical contradiction there. Nothing broke. You just get a different answer. This is all perfectly in line with how maths work.
You can think of operators as functions, in that case, you could rewrite 2+3*4 as add(2, mult(3, 4)), for typical convention. But it could just as well be mult(add(2, 3), 4), where addition takes precedence. Or, similarly, for 2*3+4, as add(mult(2, 3), 4) for typical convention, or mult(2, add(3, 4)), where addition takes precedence. And I hope you see how, in here, everything seems to work just fine, it just depends on how you rearrange things. This sort of functional breakdown of operators is much closer to mathematical reality, and our operators is just convention, to make it easier to read.
Something in between would be requiring parentheses around every operator, to enforce order. Such as (2+(3*4)) or ((2+3)*4)
SmartmanApps@programming.dev 4 days ago
The Distributive Law and Arithmetic is very simple.
Nope, a literal Law. See screenshot
Isn’t a Maths textbook, and has many mistakes in it
Yes it does 😂
2+3x4=2+3+3+3+3=14 by definition of Multiplication
2+3x4=5x4=20 Oops! WRONG ANSWER 😂
No, I pointed out that it can’t be calculated like that, you get a wrong answer, and you get a wrong answer because 3x4=3+3+3+3 by definition
Just a wrong answer and a right one. If I have 1 2 litre bottle of milk, and 4 3 litre bottles of milk, even young kids know how to count up how many litres I have. Go ahead and ask them what the correct answer is 🙄
You got a wrong answer when you broke the rules of Maths. Spoiler alert: I don’t have 20 litres of milk
A provably wrong answer 😂
2+3x4=20 is not in line with how Maths works. 2+3+3+3+3 does not equal 20 😂
rule
And it gives you a wrong answer 🙄 I still don’t have 20 litres of milk
No, I see quite clearly that I have 14 litres of milk, not 20 litres of milk. Even a young kid can count up and tell you that
Correctly or not
The notation is, the rules aren’t
No it wouldn’t. You know we’ve only been using brackets in Maths for 300 years, right? Order of operations is much older than that
Which is exactly how they did it before we started using Brackets in Maths 😂 2+3x4=2+3+3+3+3=14, not complicated.