|Re: Which calculator passes the first test?|
Message #13 Posted by bill platt on 1 Dec 2010, 8:18 p.m.,
in response to message #12 by Walter B
English is even more concise:
P E M D A S
Multiplication & Division
Addition & Subtraction
I looked at this very problem in detail a few years ago. For most calculators and calculator users, the problem originates with a misunderstanding of the way each machine works and especially what the CHS or +/- key does, as compared to the - key.
Some calculators parse a command line. Others operate and never parse. An RPN machine operates, an RPL machine parses. Some ALG or SemiALG machines parse some things but operate with others.
**Edit: note that RPL parses when using an Algebraic Object delimited by single quotations. It operates on stack items or a valid command line object**
The traditional "Alg" machine (which is better described as infix arithmetic with postfix functions) is an operator not a parser. DAL and SVPAM etc are parsers.
Then there are machines which have documented features which may be confusing. The 32sii equation list recognizes a "unary minus" with precedence over exponentiation, but it has a bug when it is in the initial position! See Craig Finseth's HPDatabase. The 33s and 35s eliminated this confusing unary minus feature and they are correctly documented.
Then there is the confusion of the fact that some machines have more than one mode, where one mode has a line interpreter but the other operates (e.g. 17bii, 27s, 32sii, 33s, 35s). Some machines will allow the +/- key to work as an operator only, while others allow it to function as a toggling character key. Some machines treat both the - and the +/- as the same thing, others as different things. And then some machines such as the 35s have a "high" minus sign when you push the +/- and a low one with the - even if there is no functional difference....
It is very confusing and totally MACHINE SPECIFIC. I haven't found any machines that are perfect except for the 48G series and descendants, and the pure RPN machines. I haven't looked at the latest Sharp/Casio/Ti so it may be the case that some of them are clearcut now.
In RPN, there is never an issue, as there is NO PRECEDENCE because there is only operation, not line interpretation/parsing.
[edit: small grammatical error and incorrect reference]
Edited: 8 Dec 2010, 8:18 a.m. after one or more responses were posted