Social conventions are real, well defined things. Some mathematicians like to pretend they aren’t, while using a truckload of them; that’s a hypocritical opinion.
That’s not to say you can’t change them. But all of basic arithmetic is a social convention, you can redefine the numbers and operations any time you want too.
SmartmanApps@programming.dev 3 weeks ago
Nope, rules arising from the definition of the operators in the first place.
It most certainly is a mathematical truth!
The mnemonics are conventions, the rules are rules
SkyeStarfall@lemmy.blahaj.zone 3 weeks 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 3 weeks 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 3 weeks 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)