RPN vs AOS vs ALGEBRAIC ENTRY - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: RPN vs AOS vs ALGEBRAIC ENTRY (/thread-94159.html) |
RPN vs AOS vs ALGEBRAIC ENTRY - Andy Morales - 06-12-2006 I took the following equation for flight MACH no from a CORVUS 500 RPN Calc manual (ala HP45)
SQRT 5X(((((400/661.5)^2)X (.2) -1)X (29.96/15)+1)^.286)-1) Warmest regards to all
Andy Re: RPN vs AOS vs ALGEBRAIC ENTRY - Walter B - 06-12-2006 Quote: Andy, it's just a matter of operation priority. As they taught me in the late sixties, it is "hoch vor Punkt vor Strich" (i.e. exponentiation first, then multiplication and division, then addition and subtraction -- a nice example for a short German expression for a long English explanation). If you key in -3^2 , this is equivalent to -(3^2) , resulting in -9 also on a good old HP71 ;-)
No witchcraft at all :-)
Re: RPN vs AOS vs ALGEBRAIC ENTRY - Karl Schneider - 06-12-2006 Andy --
Quote: All three of my EOS calculators (Texas Instruments TI-82, Casio fx-115MS, Sharp EL-520R) give -9 as the answer for the symbolic expression [change sign] 3 [x2]. This is as it should be, in my opinion. -3 is equivalent to -1 * 3, and exponentials have precedence over multiplication, as Walter B. pointed out. EOS entails the parsing of symbolic expressions prior to evaluation. Also, these calculators (two of them are modern cheapies!) provide an unshifted x2 key. I wish that my 1980's HP calc's had that, but there was the matter of limited keyboard space.
-- KS
Re: RPN vs AOS vs ALGEBRAIC ENTRY - Palmer O. Hanson, Jr. - 06-12-2006 The rule that is needed in this case isn't "...exponentiation first, then multiplication and division, then addition and subtraction... . The rule that is needed is the old Navy rule for what to do when a machine doesn't do as one expects
"WHEN ALL ELSE FAILS, TRY READING THE INSTRUCTIONS"
Re: RPN vs AOS vs ALGEBRAIC ENTRY - rsenzer - 06-13-2006 I think there are two valid ways of looking at "-3^2" and getting the result "-9". Note that in a textbook there is no difference between the "-" in "-3^2" and the "-" in "5 - 2". The first way treats the leading "-" as a unary minus. On the EOS calculators, the unary minus operator has a separate key vs. the minus key. [Of course, this is true on most every scientific calculator, but its the way they are used on an EOS calculator that is pertinent here.]. So, "[(-)]3^2" is executed as (-1)*3^2 as stated above.
Another way to think about the textbook representation is that the "-" in "5 - 2" as well as "-3^2" is a minus. In the textbook representation, any expression or subexpression beginning with a
In this interpretation, "(-3)^2" would, of course, be equivalent to Either interpretation will produce the same values as the end result. I prefer the latter methodology. From a computer perspective, think about the statements, integer ii; ... ii := -3^2; In a computer language that incorporates a "^" as an exponentiation operator. Conceptually, if the assignment statement was the first time ii was given a value, it might well have a zero in the corresponding register preceding the assignment and following the assignment, 9 would be subtracted from ii. [Needless to say this is only conceptual, as a value of -9 might be placed in ii as a result of this instruction, depending upon the actual implementation.] There are several posts about this matter in old archives. My objection to the EOS implementations is not in having a CHS and a minus. I don't like the fact that pressing a minus at the beginning of an expression on a new line automatically generates "ANS -", that is, subtract from previous answer. So "MINUS 3" becomes "ANS - 3" rather than "CHS 3". This causes all kinds of problems for students.
Note that some [not the latest] DAL/EOS SHARP calculators had a dual mode for their CHS operator. Before an expression or number, the CHS acted as a unary minus. After a number, it changed the sign of the preceding number by negating it and wrapping the number in parenthesis. I liked this implementation. It worked for individuals who were use to the previous generation of AOS calculators as well individuals who wished to enter an expression directly in textbook format. Unfortunately, the new implementation on DAL/EOS SHARP calculators does not seem to offer any direct way to enter an expression like "-3^2" because using CHS before or after the "3" results in "(-3)^2".
Re: RPN vs AOS vs ALGEBRAIC ENTRY - Maximilian Hohmann - 06-13-2006 Hi! No wonder, that you get strange answers, there is something wrong with your parentheses. When I copy-paste your equation into a FORTRAN source file (I had to add one pair of parentheses for the SQRT): PROGRAM MACH
WRITE(*,*) END
the compiler complains like this: Greetings, Max (baby-boomer aerospace engineer too :-) ) NB: I'm pretty sure (will try it at home tonight) that a Ti-92 should habe nor trouble with your calculation
Edited: 13 June 2006, 6:28 a.m.
Re: RPN vs AOS vs ALGEBRAIC ENTRY - Andy Morales - 06-13-2006 Walter,
I got same result using an antique SHARP 1250A with Basic. Hmmmmmm Have a great day. I return to my workstaion, fire up Pro/ENGINEER Wildfire and resume my solid modeling. Hey, that TI59 Emulator works great, so does the HP41 on the old COMPAQ with 23 inch flat screen. Cool...... Regards,
Andy Re: RPN vs AOS vs ALGEBRAIC ENTRY - Andy Morales - 06-13-2006 Please forgive my error entry ways. Have a great day Regards,
Andy Re: RPN vs AOS vs ALGEBRAIC ENTRY - Maximilian Hohmann - 06-13-2006 Hi!
Quote: ... already forgiven :-) ... but if you could correct your equation then I would try it out for myself on different calculators to see what results I get. Just out of curiosity!
Greetings, Max
Re: RPN vs AOS vs ALGEBRAIC ENTRY - Andy Morales - 06-13-2006 Max,
Here is link to Corvus 500 manual: Equation is found there, however if memory services me right, there was a different equation in the HP 21, HP25/25C manual as well. Warmest regards,
Andy
Re: RPN vs AOS vs ALGEBRAIC ENTRY - Andy - 06-13-2006 Max, On page 8 of Corvus 500 manual is where equation is found.
:)
Re: RPN vs AOS vs ALGEBRAIC ENTRY - Andy Morales - 06-13-2006 Max, I had a co-worker who owned a Corvus 500. Very elegant machine, had 3 re-chargeable batteries that were easy to change, a fraction of the cost of a HP 45. APF also had the 55 model with same logic. Although construction not bullet proof like the HP units.
:)
Re: RPN vs AOS vs ALGEBRAIC ENTRY - Andy Morales - 06-13-2006 Long live my NATIONAL SEMICONDUCTOR 4520 (made in Hong Kong). The ole NOVUS with vintage MINT AC/charger, leather case, comprehensive manual in Mint box with great RPN logic but dismal accuracy in the 6-7th place (who cares) does it all. Want a "El cheapo" Go for the NOVUS 4510 mathematician. No Scientific notation, but a lame 3-level stack that gets the job done-LOL Have a great day all, "LOVE THOSE RPN RELICS"
Andy
Re: RPN vs AOS vs ALGEBRAIC ENTRY - Maximilian Hohmann - 06-13-2006 Hi Andy,
Quote: ... OK, found it! My little FORTRAN-program (purest AOS so to say) no reads PROGRAM MACH WRITE(*,*) 1 SQRT(5.0 * ( (((((400.0/661.5)**2)* 0.2 + 1.0)**(1.4/0.4) -1.0) 2 * 29.96/15.0 + 1.0)**0.286 - 1.0) ) END and displays 0.8232687712 as result. Now back to CATIA (no solid modelling though, but developing little additional functions).
Greetings, Max
Re: RPN vs AOS vs ALGEBRAIC ENTRY - Andy Morales - 06-13-2006 Max, CATIA? I did take a Saturday course in the latest version (10) a year ago hoping to use it at NGC, however i am still at Raytheon using Wildfire. I know some companeros that are using CATIA the old version in Seattle. Take care Bro, Warmest regards,
Andy Re: RPN vs AOS vs ALGEBRAIC ENTRY - Maximilian Hohmann - 06-13-2006 Hi
Quote: Straying Off-Topic, I know, but: 1. We are now already at version 15 (Catia V5) 2. Raytheon? In my other job, I fly small corporate aircraft and have been trying to convince one of my employers to buy one of your products: A Premier One. One of the most beautiful airplanes ever built! 3. My Catia (V4) work is mostly for their competition at Toulouse... Greetings, Max
Edited: 13 June 2006, 9:24 a.m.
|