> There are no underlying mathematical precedence rules.
You might want to correct the information here then:
https://en.wikipedia.org/wiki/Order_of_operations#Convention...
Re:We need to talk about parentheses
by thaumasiotes on Monday February 12, 2024 @01:40PM
(#39348585)
What do you think I'd want to correct? That page says the same thing you've already been told twice: there is no underlying mathematics, and the meaning of the notation is defined by the notation. Here's a quote:
> These rules are meaningful only when the usual notation (called infix notation) is used. When functional or Polish notation are used for all operations, the order of operations results from the notation itself.
You could "correct" that to observe that "the order of operations results from the notation itself" is true of all notation, including infix notation, but why? It's not wrong now.
Can you really not tell the difference between "notation" and "math"?
"Order of operations" is the order in which operations proceed. Hence precedence.
They aren't a fact about mathematics. They're a fact about notation. Operator precedence and order of operations are synonymous.
This is nonsense. There are no underlying mathematical precedence rules. You're seeing precedence being represented visually, but there is no mathematical difference between 5 3 ADD 2 MUL and 5 3 2 MUL ADD.
MUL and ADD are just binary operators, or if you prefer, functions from U × U to U for some set U.
Your statement is particularly nonsensical as applied to the example you're supposedly responding to. Given some expressions:
How do you even form the argument that the difference in interpretation is "simply the graphical interpretation of the underlying precedence rules"? The precedence rules here are obvious, because they don't exist:- Division occurs between the upper operand and the lower operand
- Addition occurs between the left operand and the right operand
It's impossible for these to conflict, so there is no such concept as precedence.
(Precedence also doesn't exist between addition and addition because addition is associative. It is necessary between division and division, and the system is straightforward: lower precedence is indicated by longer lines. Tell me about the underlying mathematical precedence rule that determines that.)