3 ms·
> (0-3)^2? It’s entirely unambiguous due to the parenthesis. I don’t think the rest of your argument actually makes sense. There is no sleight of hand requir
by RandomThoughts3 2y ago
> (0-3)^2?
It’s entirely unambiguous due to the parenthesis.
I don’t think the rest of your argument actually makes sense.
There is no sleight of hand required. The original argument is entirely related to having unary minus and binary minus which are different operators conceptually have similar precedence as being less surprising.
- zmgsabst 2y agoMy point is that you can’t define “-3” as “0-3” to make it work: you’re assuming exactly what’s being debated (via sleight of hand) when you insert the terms with brackets in the way you do rather than the way I do. When you try to swap in the unary operator without that to make it “less surprising”, you get 9. Precisely what you said was wrong about the unwary operator (in Excel).
- RandomThoughts3 2y agoBut no one is defining -3 as (0-3). You are entirely missing the point. I am going to quote myself again: > The original argument is entirely related to having unary minus and binary minus which are different operators conceptually have similar precedence as being less surprising. And no, you don’t get 9 when you swap the unary operator. That’s the whole point and why it’s surprising that Excel did reverse the precedence for implementation easiness.