|Re: Algebra operations|
Message #18 Posted by rsenzer on 18 June 2002, 12:02 a.m.,
in response to message #17 by John K. (US)
This is one of those "your mileage may be different" posts. Simply my opinions. Probably best read in context with my previous postings:
In the case of the older (AOS) machines, the operators are evaluated as they are entered. The only exception being that, if the [(] key is used, the imediately preceding operation is postponed until the enclosed sequence has been evaluated and terminated by a matching [)] or by the [=] operation.
On the newer (EOS) devices, however, the entire sequence is held without evaluation until complete. So, if I enter -32, the operations are evaluated in strict precedence order (exponentiation, then subtraction in this case). But, since there is no value preceding the "-", subtraction from "0" is assumed.[n;]
Not exactly -- There are 2 keys on these EOS that are pertinent on these calculators. Using the RPN terminology, they are [(-)] CHS, and [-] subtraction. I am contending that on these calculators:
[(-)]3[x2] should yield positive 9 because negation should precede exponentiation. Negation is not subtraction.
OTOH in the expression "-32" as written in, for example, a textbook, the "-" represents subtraction and whenever it is the first character in an expression or subexpression in such text there is an implied preceding zero. So in the textbook:
"-32" means the same thing as
"0 - 32"
I agree with you that is a dangerous -- and often incorrect -- assumption. On the other hand, I'm not sure how it could be implemented differently on an EOS machine. By the time the parser gets around to dealing with the "-" operation, it has already evaluated the exponent. I'm sure it is possible, if decidedly non-trivial, to create a parser that would take the existence of any preceding values or symbols into account before deciding on how to interpret the "-3". Much simpler -- though less graceful -- to simply use a different operation to represent negation (e.g. [+/-], [CHS], [(-)], etc.). Of course, that brings us right back to how the user interprets and keys in the expression... :^)
They do have a negation key as well as a subtraction key. They both work as advertised. Unfortunately, in my opinion, the negation key has the wrong precedence. Negation should immediately bind to the following number, variable, function, and/or expression enclosed in parenthesis immediately following the negation operator. [I hope I've covered all the bases, but I've probably neglected something].
It's puzzling to me that the TI-83 doesn't have a "sign-swap" key.
Well in the form of [(-)], they do, but EOS would not allow it to act immediately, because the expression, as you stated, isn't evaluated until it is entered in its entirety.
Still more puzzling is how Christof's teacher could possibly interpret -32 as -(32), let alone that it should always be interpreted so.
Well, in this case the result is the same, but I think the interpretation may not be correct. There may also be another issue here and it might be what you intended to write about above. The pertinent issue is whether
-32 yields the same value as (-3)2
If these expressions emanate from a text, it is absolutely clear that they don't. If they are generated by any current EOS calculator and the "-" is created by pressing the CHS key, they still don't, but it is my contention that they should on such calculators.
In a text in the first expression above, the "-" would correspond to subtraction from an implicit zero, and in a text in the second case it really doesn't matter whether you consider the "-" to correspond to subtraction from an implicit zero or negation, but the implicit zero rule will always work provided you never allow contiguous operators.
It all relates to the precedence level of the negation operator on the calculator. It should also be noted that the "-" issued by the CHS key and the "-" issued by the subtraction produce distinct symbols on the display. Unfortunately, they are not sufficiently distinct in most cases.
There is another source of confusion. Christof's teacher uses an AOS calculator, the TI-30Xa. In terms of negation on this calculator, there is no ambiguity, because negation, the CHS key which appears as [+/-] [sort of] is a postfix operator and works just like the CHS key in RPN.