(100LX) Technical Applications, Nine Solver Equations

05042017, 01:36 AM
Post: #1




(100LX) Technical Applications, Nine Solver Equations
Code examples from
"Technical Applications, StepbyStep Solutions For Your HP Calculator" Hewlett Packard, Edition 2, November 1988 Source: MoHPC DVD The book provides a chapter on Advanced Solver Techniques followed by a chapter detailing nine application equations. The targets of the book are the HP27S and HP19B calculators. The nine applications are
Semantically, changes were made to reorder the variables appearing in the solver menu. One logic change was made to the LCM/GCD application so that entry variables were not modified during calculation. This post will briefly describe each application and provide examples of usage. See the book for details on each algorithm. Attachments: The equation library TECHAPPS.TXT and a PDF copy of this post. How To Use Transfer the TECHAPPS.TXT file to your HP100LX and rename it TECHAPPS.EQN. From the Business Calculator application use the File Open command to open the Tech Apps equation library or use File Merge to add the applications to the currently open equation library. Greatest Common Divisor and Least Common Multiple Enter values for A and B, and then use the GCD or LCM buttons. The original code would alter the values of A and B as GCD was computed, requiring A and B to be reentered to compute LCM. The code has been altered to modify intermediate variables instead. Code:
Examples: A=406, B=266. GCD=14 and LCM=7,714 Numerical Integration Using Simpson's rule the bounds of the area to be integrated is divided into 2N subintervals. Enter the lower and upper bound values A and B, and the value of N. The function to be integrated must be entered into the body of the code itself (example provided). Code:
Numerical Differentiation Applications are provided to calculate the first and second derivative of a function at a point. The function must be embedded in the application just as with the numerical integration application. Enter the value of the point X and the limiting value H before using the F'X or F''X button to compute the value of the derivative. Code:
Code:
Factors and Primes Enter a positive integer N. Each press of the FACT button will display the lowest prime factor of N and then the result of dividing N by that factor. Reduction ends when N and factor are 1. Code:
Examples: N=924. FACT=2, FACT=2, FACT=3, FACT=7, FACT=11, FACT=1. N=3,623. FACT=3,623, FACT=1. (N is a prime) Vector Operations The application can compute the cross product, dot product, the magnitude of a vector, and the angle between two vectors. Vectors are three dimensional and are represented as V1 = (X1, Y1, Z1) and V2 = (X2, Y2, Z2). For cross product, dot product and angle between vectors enter each vector triple. Vector magnitude applies to V1. Code:
Example: V1 = (2000, 1460, 820) and V2 = (0.008, 0.0015, 0.0049). CROSS = 8.3840, V1 = (8.3840, 3.2400, 14.6800) Complex Number Operations This application operates on two complex numbers represented as X = (RX, IX) and Y = (RY, IY). Operations provided include Addition, Subtraction, Multiplication, Division, Logarithm, Power, Inverse and Swap. Enter real and imaginary value pairs for each complex number and then press the desired operation variable. Monadic operators apply to X and the result of dyadic operators is in X. The Swap operation exchanges the values of X and Y. Code:
Example: Parallel Impedance: Zp = 1/(1/Z1 + 1/Z2) where Z1 = (150, 106.1033), Z2 = (100, 24.5044) RX=150, IX=106.1033, RY=100, IY=24.5044 INV, SWAP, INV, ADD, INV Z1 = (71.8042, 4.3021) Complex root: (27, 36)^0.5 RX=27, IX=36, RY=0.5 XY RX=6, IX=3 Triangle Solutions Given necessary values for sides S1, S2, S3 and angles A1, A2, A3 of a triangle, the application will compute remaining sides and angles as well as area of the triangle. Triangle solutions include SideSideSide (S1,S2,S3), ASA (A3,S1,A1), SAA (S1,A1,A2), SAS (S1,A1,S2) and SSA (S1,S2,A2). Pressing the triangle solution variable following data entry will display the area. Code:
Example: Triangular land parcel. Sides are measured from a point with the angle between points. S1=171.63, S2=297.35, A1=98.2, Press SAS variable. SAS=25,256.21, S3=363.91, A2=27.83, A3=53.97 3 x 3 Matrix Operations This application can compute the determinate and inverse (if it exists) of a three by three matrix. Matrix elements are represented by variables A11, A12, ... A32, A33. Enter the value of each individual matrix element, and then press the DET variable to compute the determinate of the matrix. If the determinate is nonzero, then the matrix inverse is stored in the matrix elements A11 to A33. To solve a system of three linear equations in three unknowns of the form Ax = C Enter the matrix element values A11 to A33, then the constant values C1, C2, C3. Press the SIM variable to compute the three unknowns X1, X2, X3. Code:
Example: Find the determinate and inverse of the matrix 1 2 3 1 3 3 1 2 4 Enter values A11=1, A12=2, A13=3, etc. then press the DET variable. Result is 1 with the inverse matrix being 6 2 3 1 1 0 1 0 1 Solve the DC circuit analysis problem generated by summing the voltage drops around three current loops 800i1  330i2 + 0i3 = 15 330i1 + 530i2  100i3 = 0 0i1  100i2 + 1100i3 = 0 Enter the matrix values as A11=800, A12=330, A13=0, etc. Enter the constant array as C1=15, C2=0, C3=0. Press the SIM variable to solve for currents. X1=25.4mA, X2=16.1mA, X3=1.5mA Coordinate Transformations This application provides two or threedimensional coordinate translation and/or rotation operations. A point is represented by the variables X, Y, Z and the origin is assumed to be (0, 0, 0). The translated point is given by the variables X', Y', Z' and the origin of the translated system is given by the variables X0, Y0, Z0. The rotation angle ANG is in reference to a vector given by A, B, C (righthand rule). Any values given to A, B, C will be converted to a unit vector by the program. Zero for A, B, C will do only translation. Pressing the FTRN variable performs forward transformation from the old to new system (X Y Z > X' Y' Z'), while pressing ITRN performs the inverse transformation from new to old system (X' Y' Z' > X Y Z). Code:
Example: Translate point P1(9,7) and P2(6,8) with origin (0,0) to a system with origin (7,4) and rotate 27 degrees. For a two dimensional vector, the rotation axis is specified as (0, 0, 1). Then translate point P3'(2.7,3.6) back to original system. Enter ANG=27, A=0, B=0, C=1. Enter the system point as X=9, Y=7. The translated system origin is entered as X0=7, Y0=4. Press the FTRN variable to get FTRN=X'=9.2622, Y'=17.06. Enter P2 as X=^, Y=8 then press FTRN to get the translated/rotated point as FTRN=X'=4.5569, Y'=11.1461. Enter new system point P3' as X'=2.7, Y'=3.6 and press ITRN to get point in original system as ITRN=X=11.0401, Y=5.9818. A three dimensional coordinate system is translated to an origin of (2.45,4.00,4.25). Afterwards, a rotation of 62.5 degrees is made about the (0,1,1) axis. What are the new coordinates of the point (3.9,2.1,7.0)? Clear variables then enter ANG=62.5, A=0, B=1, C=1. Set new origin coordinates X=02.45, Y0=4.00, Z0=4.25 and enter the sample point X=3.9, Y=2.1, Z=7.0 and press FTRN. The point in the new system is FTRN=X'=3.5861, Y'=0.2609, Z'=0.5891. 

05042017, 12:41 PM
Post: #2




RE: (100LX) Technical Applications, Nine Solver Equations
(05042017 01:36 AM)mfleming Wrote: Code examples from Excellent, thanks for sharing this. This book is my favorite HP StepbyStep book, probably my favorite of any of the various Solutions Books. I knew the Solvers were similar in the LX machines, but did not realize they are that similar. I presume the 200LX would also be compatible? What s/w can one use on a modern PC to connect to an LX machine to download the file? That much typing on an LX keyboard used to be a challenge, now it's an eye test. Thanks again for sharing this, it's cool! Bob Prosperi 

05042017, 02:47 PM
Post: #3




RE: (100LX) Technical Applications, Nine Solver Equations
(05042017 12:41 PM)rprosperi Wrote:(05042017 01:36 AM)mfleming Wrote: Code examples from Very nice set of solver apps. I sneakernetted them over to my 200LX on a CF card and they do indeed appear to work fine , but I did not try every one. 

05042017, 06:09 PM
Post: #4




RE: (100LX) Technical Applications, Nine Solver Equations
(05042017 02:47 PM)Paul Berger (Canada) Wrote: Very nice set of solver apps. I sneakernetted them over to my 200LX on a CF card and they do indeed appear to work fine , but I did not try every one. The simple answers are always the best! Until you mentioned this, I forgot I even had some CF cards w/PCMCIA adapters. And these days, to use a PC card slot, one must find a nearvintage PC. ThinkPad to the rescue. Thanks Paul. Bob Prosperi 

05042017, 09:24 PM
Post: #5




RE: (100LX) Technical Applications, Nine Solver Equations
(05042017 06:09 PM)rprosperi Wrote:(05042017 02:47 PM)Paul Berger (Canada) Wrote: Very nice set of solver apps. I sneakernetted them over to my 200LX on a CF card and they do indeed appear to work fine , but I did not try every one. I just use one of those generic multicard adapters, in my case from Transend, to copy files from PC to CF card via USB. I've been a fan of the HP Solver ever since buying an HP17BII, and keying in these programs was one way of understanding how Solver programs work. The Complex Number Operations is particularly nifty. Solver programs still look like uppercase line noise though ~Mark Read history; so learn your place in Time; And go to sleep: all this was done before.  Edna St. Vincent Millay 

05052017, 02:02 AM
Post: #6




RE: (100LX) Technical Applications, Nine Solver Equations
(05042017 09:24 PM)mfleming Wrote: I just use one of those generic multicard adapters, in my case from Transend, to copy files from PC to CF card via USB. Yes, I dug out a CF card with PC Card adapter today, and will play with the solver on a 200LX this weekend. Thanks for taking the time and frustration to type in all these programs Mark; even RPL is damn friendly looking and far easier to copy than Solver programs. When I first started seeing some of the larger Solver programs, like Gerson's Trig functions, it immediately reminded me of TECO programs from PDP11 days in the 70's. TECO is easily the most extreme writeonly language I've ever seen. Anyone else recall playing with TECO? Bob Prosperi 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)