▼
Posts: 901
Threads: 113
Joined: Jun 2007
Earlier this year I purchased a 19BII which came with a manual and I decided to try to use it in algebraic mode. Of course, what I soon found is that the algebraic mode isn't algebraic at all but operates in what I have always called adding machine arithmetic; i.e, without the old "my dear aunt Sally" precedence. I knew that machines developed for the business community have often been mechanized that way for some reason. Page 120 of the Fifth Edition of Wlodek's book explains that by saying that the HP business models "... all work without precedence, assuming that business users do not bother with fancy ideas like this.", i.e., with precedence. Most of the TI business models also operate without algebraic precedence where the exception that I am most familiar with is the old MBA.
But then I discovered that the sequence
5 + 3 y^x 2 =
yielded 64, not the value of 14 that I expected. That occurs because the y^x function causes the 5 + 3 to be executed. So I ask, "Why do they do it that way?"
▼
Posts: 1,248
Threads: 33
Joined: Aug 2007
Quote:
Wlodek's book explains that by saying that the HP business models "... all work without precedence, assuming that business users do not bother with fancy ideas like this.", i.e., with precedence...
So I ask, "Why do they do it that way?"
We've had some discussions about this in the past. I maintain that the idea expressed above, that algebraic precedence is somehow a "fancy idea", is nonsense. Do business users not go to high school? This is just basic math! In other words, the calculator models that work like this are just giving incorrect results, IMO.
▼
Posts: 4,027
Threads: 172
Joined: Aug 2005
Edited: 15 May 2010, 10:48 p.m.
Posts: 901
Threads: 113
Joined: Jun 2007
Quote:
... the calculator models that work like this are just giving incorrect results, IMO.
That is not at all true! All the user has to do is to understand how his machine works, whichis also true of RPN and Algebraic.
But I admit that I may not have framed my question appropriately. It is generally understood that many of the machines targetted for business users are mechanized without precedence since that is how the old mechanical desktops worked and many business users are comfortable with that. What surprised me was that the y^x function operates at the same level as the four arithmetic operators and I wondered why.
▼
Posts: 1,248
Threads: 33
Joined: Aug 2007
Quote:
All the user has to do is to understand how his machine works, which is also true of RPN and Algebraic.
Of course I understand this. I did not mean to say the machine is malfunctioning, but I still say it is giving wrong answers! Luiz stated what I believe about this very well, with his test example. I still maintain that algebraic precedence is a universal standard that applies to business math the same as other disciplines.
▼
Posts: 901
Threads: 113
Joined: Jun 2007
Quote:
I still maintain that algebraic precedence is a universal standard that applies to business math the same as other disciplines.
Algebraic precedence does apply to to business math the same as other disciplines when it comes to writing equations on paper. But it doesn't apply to the way many business people expect calculators to work. The proof of my statement is the "algebraic" methodology  really adding machine arithmetic  which is used whereever "algebraic" is offered as an option in business calculators manufactured by HP.
▼
Posts: 1,248
Threads: 33
Joined: Aug 2007
I guess we will just not agree on this. I do understand your point:
Quote:
Algebraic precedence does apply to to business math the same as other disciplines when it comes to writing equations on paper. But it doesn't apply to the way many business people expect calculators to work.
To this I respond with a paraphrase of your own question: So I ask, "Why do businessmen expect it that way?" Your answer seems to be that it's because adding machines used to work that way. So we are going to perpetuate incorrect math operations forever, just because early machines were too simple mechanically to do it correctly?
▼
Posts: 2,448
Threads: 90
Joined: Jul 2005
Yep. Another example: the cheap "4 function" calculators all have a weird chain arithmetic system builtin. And they too have no parenthesis. Try essentially any of them, and they have the weird chain arithmetic. So it isn't merely business ones that are screwy.
I'm sure we can find other examples of unneeded "backwards compatibility" in other (perhaps noncomputing) products...I just can't think of any...
Posts: 901
Threads: 113
Joined: Jun 2007
Quote:
So we are going to perpetuate incorrect math operations forever, just because early machines were too simple mechanically to do it correctly?
Yes. We will continue to see "algebraic" without precedence in business machines as long as the gods at HP and TI and whereever else continue to believe, whether it's actually true or not, that business users aren't comfortable with precedence. That's business.
Posts: 528
Threads: 40
Joined: Dec 2008
It sounds to me like they're just being consistent. If the calculator doesn't honor precedence rules then it should do so consistently. I assume that if you enter 5+3*2 you get 16.
It's probably a hold over from the old (REALLY old) mechanical adding machines where there was no precedence. Business people got used to it and stuck. One could also argue that it's an easier to remember rule, I suppose.
Posts: 850
Threads: 10
Joined: Mar 2009
Nowadays HP call it "chain calculation" mode I think. I actually have a business friend that WANTS it to work that way. His words "If I want to sell a pack of 10 units and a pack of 5 units at £5 per unit, I want to do 10+5*5= and get 75, not 35". This may be more linked to habit as until recently he had a '70s Sanyo without "operator precedence".
Moral of the story: use RPN  no such confusion :)
Edited: 16 May 2010, 12:18 p.m.
▼
Posts: 1,089
Threads: 32
Joined: Dec 2005
Quote: Moral of the story: use RPN  no such confusion :)
Try "1 Enter 2 Enter +" on a 32S and on a 20b in RPN mode. Confused? ;).
Not to mention that you have read the manual to learn about the stack size.
▼
Posts: 1,248
Threads: 33
Joined: Aug 2007
Quote:
Try "1 Enter 2 Enter +" on a 32S and on a 20b in RPN mode. Confused? ;).
Yes, I am. Can someone explain why they work this way? "1 Enter 2 +" gives the expected answer, but "1 Enter 2 Enter +" does not. At least I would expect the operator to act on the last two stack entries, but instead it acts on the last stack entry twice!
▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
Yes, the 20b (and 30b, BTW) work this way. The 20b/30b are hybrid RPL/RPN, and this behavior is RPLish, I am told. If you ever plan to write programs for the 30b (assuming you can actually buy the 30b one day; it was released in January but has not been available for purchase for months now), you need to be aware of this nonRPN behavior.
Posts: 1,089
Threads: 32
Joined: Dec 2005
Very simple: As Don said, the 20b acts partially like a RPL calculator which has an extra register for entering numbers where earlier RPN calculators don't, so you had to enter numbers directly into the x register.
I bet, if memory wouldn't have been an issue in terms of cost in the early 70th, the 35 would have become an algebraic or RPL calculator.
Edited: 17 May 2010, 1:44 p.m.
▼
Posts: 1,248
Threads: 33
Joined: Aug 2007
No, you've got it backwards. (Unless I am missing something). My 32sii gives 4 as a result to this simple problem; my 48sx give 3, the expected answer.
▼
Posts: 1,545
Threads: 168
Joined: Jul 2005
The question hinges on whether you think in RPL or RPN.
RPL requires an ENTER to terminate a command line input.
So, 1 ENTER 2 ENTER + gives 3 since the ENTER only terminates the command line and does not specifically DUP the stack. Note: the RPL machines do an implied ENTER before an arithmetic operator so that if you actually type 1 ENTER 2 + you still get 3.
On **pure** RPN machines, ENTER terminates DIGIT entry AND pushes the stack.
So 1 ENTER 2 ENTER + gives 4 on those machines.
Issue with the 20b / 30b is that they are a hybrid.
A command line approach has been placed upon the old 4level RPN stack.
ENTER after a number entry does NOT push the number into stack level 2 aka Y.
So, you now have 3 options.
Original RPN
Original RPL
The RPN / RPL hybrid.
▼
Posts: 1,248
Threads: 33
Joined: Aug 2007
Gene, thanks for the explanation. I think I actually understand it, mostly.
Only one piece of information I lack: the result from 20b/30b. Knowing this should help me understand the difference in how the hybrids function.
▼
Posts: 1,545
Threads: 168
Joined: Jul 2005
The 20b / 30b works more like the RPL.
1 ENTER 2 ENTER + returns 3, not 4 as on "pure" RPN machines.
1 ENTER 2 + returns 3.
▼
Posts: 1,248
Threads: 33
Joined: Aug 2007
Well, then, as an RPN "outsider" (or better to say an ALG user), I have to conclude that I like the RPL and hybrid designs better than RPN. Just makes more sense to me.
BTW, I think what you call "pure" RPN isn't pure at all, at least not pure postfix. STO, RCL, and XEQ come to mind. Just as traditional ALG isn't pure infix. RPL, on the other hand, is pure postfix (48 series), or pure infix (38G), at least as far as I can tell.
▼
Posts: 850
Threads: 10
Joined: Mar 2009
Quote:
Well, then, as an RPN "outsider" (or better to say an ALG user), I have to conclude that I like the RPL and hybrid designs better than RPN. Just makes more sense to me.
I started using HPs with the 28S, which is RPL. It also has the advantage of an "unlimited" stack (as memory allows), thus no "dropping off the top" of arguments.
Posts: 1,089
Threads: 32
Joined: Dec 2005
What you expect is a result of what you know ;). If you know RPN, you expect 4. 1 ist entered to x, "Enter" shifts it up to y (and y to z and so on), but keeping x (it's not a rotation). "2" is entered, overwriting 1. Same procedure after the second Enter, so in the end, both x and y registers contain 2, z contains 1. That's how RPN always worked and a result of x being used as entry register. On RPL machines, entries are written to a temporary register unless Enter is pressed. Now, if you press e.g. a binary operator before finishing an entry, the content of this temp register is copied to whatever the stack pointer points at. In contrast to RPN, RPL uses a clutch to show some convenience. It absolutely needs an Enter after each entry, and does it itself when the user refuses to do so.
RPN is very straightforward.
▼
Posts: 1,248
Threads: 33
Joined: Aug 2007
Quote:
What you expect is a result of what you know ;). If you know RPN, you expect 4...
RPN is very straightforward.
Can't argue with the first statement above. I did not "cut my teeth" on RPN, as most of you have, nor do I use it very often.
Regarding the second statement, though, my thinking is evolving. When I first started using my 48sx, I found it very confusing to use. The more I use it, the more consistent I find its construct to be, albeit in some respects not particularly intuitive.
Posts: 850
Threads: 10
Joined: Mar 2009
Ah, yes, I forgot about the RPN/RPL difference. Interesting that the 20b has RPL behaviour. I started my "HP life" with the 28S, thus RPL. I had to get used to "stack lift" when I purchased the 35s :)
Posts: 4,027
Threads: 172
Joined: Aug 2005
.... based in all that´s been written, if I am taking an examination and I have to calculate
5 + 3 y^{x} 2
I must ask the teacher what kind of result he wants or should I write:
"If I am a businessman or if I am using a financial calculator, 5 + 3 y^{x} 2 yields 64, but if I am a professional from any other scientific area or if I am using a 'regular' (?) calculator, 5 + 3 y^{x} 2 yields 14."
I'm confused... isn't math an exact science?
Cheers.
Luiz (Brazil)
▼
Posts: 776
Threads: 25
Joined: Jun 2007
Quote: I'm confused... isn't math an exact science?
Math may be an exact science (in which case I think ALL of us here, and in every math class on earth, would give the answer 14 to Palmer's expression), but making calculators is clearly not!
▼
Posts: 901
Threads: 113
Joined: Jun 2007
Quote:
Math may be an exact science (in which case I think ALL of us here, and in every math class on earth, would give the answer 14 to Palmer's expression), but making calculators is clearly not!
Here is a quotation from TI's old The Great International Math On Keys Book published back in 1976:
Quote:
Mathematics is a science which is persnickety about some things. One of them is it never permits two different answers to the same series of computations. Because of this requirement  one solution for any computation  mathematicians have established a set of accepted (and universal) rules when mixed operations are in one calculation. For example, the problem
3 + 10  2 x 14 / 7 = ?
has only one answer! (Know what it is? It's 9.)
... Not all calculators will do this. ...
We all know the HP position on the use of RPN, namely that it's use avoids confusion.
If HP and TI and Casio as well take such strong positions on the right way to do things then the obvious question is "Why are they making calculators which use adding machine arithmetic?"
The answer is simple. Mathematics may be an exact science, but making and selling calculators is a BUSINESS.
While I am on the subject a recent thread told me that the latest version of the HP12C (the C++ is it?) has an algebraic option. Can anyone tell me if the algebraic option uses algebraic precedence or does it use adding machine arithmetic.
Palmer
▼
Posts: 2,448
Threads: 90
Joined: Jul 2005
Take a look at Craig Finseth's HPdatabase:
http://www.finseth.com/hpdata/hp12cpt.php
Posts: 1,248
Threads: 33
Joined: Aug 2007
Quote:
While I am on the subject a recent thread told me that the latest version of the HP12C (the C++ is it?) has an algebraic option. Can anyone tell me if the algebraic option uses algebraic precedence or does it use adding machine arithmetic.
Palmer, I don't think it's the 12c+, but the 12c Platinum, and 12c Platinum 25th Anniversary Edition, that have the algebraic mode. That said, although I did own one for a short time, I cannot remember how the ALG mode worked.
Seeing Bill Platt's post, I went to Finseth's site. He states:
Quote:
Algebraic mode has no precedence. It also has no parentheses.
While the original Platinum (all silver) did not have parentheses, the latest version (Silver and black) and the 25th Anniversary Edition, do have them.
Edited: 16 May 2010, 10:25 p.m.
Posts: 4,027
Threads: 172
Joined: Aug 2005
Hi, all.
Back in the 80´s, when I started dealing with computers, it took me a willing to know about the history of these tricky machines. I was just an electrical engineer student, and at that time, under military government (final years), Brazilian educational system was 'shacked' by new paradigms and engineers were not exactly encouraged to go beyond their own Cartesian thoughts. I failed to do so and went ahead studying whatever I could.
I clearly remember searching for computers' design timeline and reading about Blaise Pascal and his contributions in the field. Something in particular called my attention and I quote Wikipedia by helping me with the historical fact:
Quote: In 1642, in an effort to ease his father's endless, exhausting calculations, and recalculations, of taxes owed and paid, Pascal, not yet nineteen, constructed a mechanical calculator capable of addition and subtraction, called Pascal's calculator or the Pascaline.
In an effort of helping his father with taxes figures and calculations, Pascal constructed a mechanical addition/subtraction calculator. If I remember it well, I red that the Pascaline was the first desktop calculator ever, and it was designed and built for... financial calculations!
Cannot say anything about Pascaline precedence because it provided only addition and subtraction, but if the above mentioned facts are correct, businessmen may actually care less for precedence for their first calculator did not provide it.
What do we know...
Luiz (Brazil... and still without answers)
Edited: 17 May 2010, 10:57 a.m.
Posts: 104
Threads: 0
Joined: Dec 2007
Historically, a reason that traditional RPN worked as stated was apparently to allow simple squaring or doubling of a value in the X register.
3 ENTER *
or
3 ENTER + (less keystrokes than 3 ENTER 2 *)
The HP35 and HP80 didn't even provide an X^2 key!
The paradigm survived in subsequent RPN machines. Pressing ENTER pushed the stack, but left a temporary copy of the X register still in X for convenience (and because something had to be there).
If the user started entering digits, the temporary value was overwritten. If they executed an operation it was utilized.
