[JOKE] RPN vs. Algebraic: The Match ! « Next Oldest | Next Newest »

 ▼ Valentin Albillo Posting Freak Posts: 1,755 Threads: 112 Joined: Jan 2005 03-28-2006, 06:13 AM Hi, all: [Caveat emptor: All that follows is thoroughly tongue-in-cheek, to try and cheer up the Forum a little. V.] There's been a number of recent posts praising how RPN makes the process of evaluating an algebraical expression easy and intuitive, without having to deal with parentheses and/or implicit rules of precedence, etc. Well, let's put it to test. Suppose we're asked to evaluate these expressions: ``` 0.5 + 0.2 * 0.3 and 0.312 * 0.437 + 0.251 ``` Here's how I would do it algebraically: ``` Using the distributive property of addition over multiplication, also known as the distributive law of sum: a + b*c = (a+b)*(a+c): 0.5 + 0.2 * 0.3 = = (0.5 + 0.2) * (0.5 + 0.3) = 0.7 * 0.8 = 0.56 Similarly for the second one: 0.312 * 0.437 + 0.251 = = (0.312 + 0.251) * (0.437 + 0.251) = 0.563 * 0.688 = 0.387344 ``` For a more complicated test, let's suppose we're asked to evaluate the following expression: ``` (2+1/4)^(3/2) ``` Here's how I would do it algebraically: ``` Using the rule of exponents: (a+b)^c = c*(a+b): (2+1/4)^(3/2) = = (3/2) * (2+1/4) = (3/2) * (9/4) = (3*9) / (2*4) = 27/8 ``` What ? You don't like these algebraically obtained values of mine ? Well, let's see if RPN gets you any better results. :-) Best regards from V. Edited: 28 Mar 2006, 6:18 a.m. ▼ Namir Posting Freak Posts: 2,247 Threads: 200 Joined: Jun 2005 03-28-2006, 08:05 AM This is an old PPC joke I heard over 20 years ago in one of the PPC national meetings. The joke is purely fictional. The Santa Ana municipality issued a citation to Richard Nelson, founder of the PPC, for improperly disposing of trash bags! Richard was shocked because he did not improperly dispose of trash, pure and simple! It just was not in his character to do that! He drove to the municipality and confronted the official who issued the citation to protest against this error. “What crazy evidence led you to point the finger at me?!!”, protested Richard. The official calmly responded, “We found a fully functioning TI-59 calculator in the trash bag!” Edited: 28 Mar 2006, 8:06 a.m. ▼ Palmer O. Hanson, Jr. Posting Freak Posts: 901 Threads: 113 Joined: Jun 2007 03-28-2006, 10:43 PM Last month I broke down and purchased my first new-in-the-box High-Priced programmable calculator -- an hp-33s. I told Richard Nelson. Last week Richard told me that he had purchased a TI-89. Repent! The end of the world may be nearer than you think! ▼ Gene Posting Freak Posts: 1,107 Threads: 159 Joined: Jan 1970 03-29-2006, 09:08 AM Yes, and I have seen that TI-89 in Richard's hands. I have to admit I felt like sitting down quietly somewhere. :-) ▼ Namir Posting Freak Posts: 2,247 Threads: 200 Joined: Jun 2005 03-29-2006, 12:57 PM This si truly shocking to me! I am emailing Dr Phil to help me deal with this trauma! :-( Namir Marcus von Cube, Germany Posting Freak Posts: 3,283 Threads: 104 Joined: Jul 2005 03-28-2006, 12:50 PM Valentin, let's try: ``` 0.5 + 0.2 * 0.3 ``` We have to transform the infix notation to postfix notation first: ``` 0.5 -> 0 5 . 0.2 -> 0 2 . 0.3 -> 0 3 . ``` The complete evaluation in RPN looks like the following: ```0 ENTER 2 . 0 ENTER 3 . * 0 ENTER 5 . + ``` which gives the result 5.00 accurate two 2 digits. Marcus ▼ Howard Owen Posting Freak Posts: 1,830 Threads: 113 Joined: Aug 2005 03-28-2006, 03:40 PM Typical sloppy RPN hackery. The error is in the conversion to RPN. The digit string should be reversed, with the decimal staying put: 0.2 -> 2.0 0.3 -> 3.0 0.5 -> 5.0 Thus, algebraically we have: 5.0 + 2.0 * 3.0 and by the 2nd commutative law of addition: 5.0 + 3.0 * 2.0 + 6.4 or, in RPN: 2 ENTER 2 + Which is five, purely by coincidence. ▼ Vieira, Luiz C. (Brazil) Posting Freak Posts: 4,027 Threads: 172 Joined: Aug 2005 03-29-2006, 01:46 PM Indeed! (in the lack of a better word) ▼ Valentin Albillo Posting Freak Posts: 1,755 Threads: 112 Joined: Jan 2005 03-30-2006, 03:32 AM Hi, Luiz Claudio: Luiz Claudio posted: "Indeed! (in the lack of a better word)" It's "for lack of a better word" or "for lack of a better term". By the way, congratulations for your fellow countryman Mr. Marcos Pontes becoming the first Brazilian cosmonaut ! :-) Best regards from V. ▼ Vieira, Luiz C. (Brazil) Posting Freak Posts: 4,027 Threads: 172 Joined: Aug 2005 03-30-2006, 03:57 AM Hi, Valentin; Thanks! Twice! d8^) Best regards. Luiz (Brazil)

 Possibly Related Threads... Thread Author Replies Views Last Post [PRIME] RPN: another attempt at returning more than one value to the RPN stack Marcus von Cube, Germany 5 1,603 11-05-2013, 02:44 AM Last Post: Marcus von Cube, Germany Immediate algebraic expressions in RPL+ Oliver Unter Ecker 8 1,693 11-19-2011, 04:29 AM Last Post: Oliver Unter Ecker HP-42S Repair and Color Match aj04062 0 512 03-28-2011, 07:10 PM Last Post: aj04062 programming HP35s in algebraic mode, please. Kip Hopkins 10 1,782 01-16-2011, 06:28 PM Last Post: Kip Hopkins New Iphone & Itouch calculator - Access RPN and Active RPN Nigel Bamber 1 789 06-10-2009, 04:13 PM Last Post: Jean-Michel OT: Math Joke John B. Smitherman 46 6,245 05-01-2009, 06:01 PM Last Post: Kiyoshi Akima Another calculator with RPN (Corvus 500 RPN) Saile (Brazil) 7 1,465 03-31-2009, 12:14 AM Last Post: Michael de Estrada RPN or algebraic designnut 0 564 03-16-2009, 06:14 PM Last Post: designnut algebraic simplification on the 50G Hal Bitton in Boise 19 3,158 08-28-2008, 05:56 AM Last Post: Marcus von Cube, Germany Do HP owners use Algebraic entry? designnut 38 5,520 10-27-2007, 11:47 AM Last Post: Walter B

Forum Jump: