HP 41C and DM41: Operations by Test, Messages, Block Storage - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: HP 41C and DM41: Operations by Test, Messages, Block Storage (/thread-15907.html) HP 41C and DM41: Operations by Test, Messages, Block Storage - Eddie W. Shore - 11-17-2020 03:40 PM Blog Link: http://edspi31415.blogspot.com/2020/11/hp-41c-and-dm41-operations-by-test.html The programs are inspired from a great calculator resource, "Calculator Tips & Routines Especially For The HP-41C/41CV", edited by John Dearing (see source below). Operations by Test One of the tips presented is the selection of one of two opposite arithmetic operations based on a comparison between X and Y values. This tip was provided by Bill Kolb (tip 2-7). They are: X?Y CHS (subtract if test is true) + (add if test is false) X?Y 1/X (divide if the test is true) * (multiply if the test is false) X?Y 1/X (take the root if the test is true) Y↑X (take the power if the test is false) The following programs uses the test XY 15 LBL 01 16 STO IND Y // keystrokes: [ STO ] [ shift ] [ . ] ( Y ) 17 ^T STORING... // message 18 AVIEW 19 ISG Y // keystrokes: [ shift ] ( ISG ) [ . ] ( Y ) 20 GTO 01 21 ^T DONE 22 AVIEW 23 PSE 24 CLD 25 END Try this: Store π in R00 to R03 and e^1 in R04 to R07. Results: (Fix 4) R00: 3.1416 R01: 3.1416 R02: 3.1416 R03: 3.1416 R04: 2.7183 R05: 2.7183 R06: 2.7183 R07: 2.7183 Source: Dearing, John. "Calculator Tips & Routines Especially for the HP-41C/41CV" Corvallis Software, Inc. Corvallis, OR. 1981 Link on ***** (account needed): http://www.*****/LibView.cfm?Command=View&ItemID=320