3 ms·
Ah bummer. Both of those were actually just transcription errors because I was writing formulas out in the course of a meeting, playing with whether the order o
by catpolice 10y ago
Ah bummer. Both of those were actually just transcription errors because I was writing formulas out in the course of a meeting, playing with whether the order of the v operator should be that way or the other way around - I don't have time to give it much thought at the moment but I'm admittedly less convinced I picked the right one.
In the second case, that was a typo. In the first case, what I'd meant to write was: "Note that ((x * n) / x) = n. Similarly, ((x ^ n) v x) = n."
You're right that neither is a symmetric operator but of course neither is division or subtraction. I sort of glossed over that intentionally, but the non-commutativity of the ^ operator would indeed probably be the main place that switching to infix operators could mislead.
- Chinjut 10y agoI didn't mean to come across as unduly harsh. But, yeah, I think a misleadingly symmetric looking notation for an asymmetric operation can be a source of confusion (this is also a potential problem with the misleadingly symmetric looking triangle of the linked video, and standard notation for subtraction, etc., for that matter [though in this last case, it's been beaten into us with enough familiarity that we all know the deal]). Actually, I don't like infix notation in general: it leads to unnecessary, distracting questions about operator precedence and so on. I'd rather we all switched to some other notation for writing out even additions and multiplications and such; drawing out the actual tree structure of nested operations, say. (I often feel notation should simply follow the structure of what's being notated, nothing more or less. But, alas, inertia; I can only use the notation I like in the privacy of my own home...)
- catpolice 10y agoInfix notation IS funny, though I figured anyone learning arithmetic would be familiar and we're stuck with it - we probably can't convince grade schools to use Polish notation for arithmetic by default. In general, my attitude is that you should pick a notation that makes all the similarities with things you already know as obvious as possible and then stress the differences. They've already learned about non-symmetric infix operators if they've learned subtraction and division, and the only reason to expect that ^ would be symmetric was by analogy to multiplication, which is easy to clear up. Take it as a lesson that by default you should never assume operations are symmetric, in preparation for linear algebra ;)