(-) precedence
|
12-10-2022, 01:51 AM
Post: #25
|
|||
|
|||
RE: (-) precedence
(12-09-2022 02:52 PM)KeithB Wrote: I don't think that anyone has mentioned that the Prime has *both* operators. A subtraction operator and the unary minus, each with different symbols. In this case, I think the unary minus should bind tighter to the number. I never noticed the Prime display of negative versus negation, but you are correct. Neat! The Prime negative indicator reminds me of the APL "high minus" in which a negative number uses the "¯" symbol to indicate a negative number, as in ¯2 as opposed to -2 That of course means ¯2 is negative two (not the negation of two or 0-2) and ¯2*2 (* is power of) equals 4 as expected, whereas -2*2 is ¯4 because APL expressions are evaluated right to left (no function precedence nonsense), and thus negation is applied last. The '-' symbol is subtraction with a LHS argument and negation without, so then 2--2 is 4 (obviously ) APL is a mathematical notation developed by a Mathematician. Wish I had an APL calculator Remember kids, "In a democracy, you get the government you deserve." |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)