(42S) Short Quadratic Solver
|
05-28-2014, 10:17 PM
(This post was last modified: 05-28-2014 11:12 PM by Jeff_Kearns.)
Post: #7
|
|||
|
|||
RE: Short Quadratic Solver (HP-42S)
(05-28-2014 04:18 AM)Gerson W. Barbosa Wrote: If the roots are complex, the flag 1 annunciator will be lit and the real and complex parts will be in registers Y and X, respectively. Gerson - The code (without INPUT prompts) works OK for real roots but not for complex roots (IMHO)... I prefer to see the results (if complex) displayed as x + iy, as per the 39 step routine based on Eddie Shore's program to which I added a couple of x<>y statements to display 'correctly'. There are two issues with this particular routine that I can't quite figure out: 1) even when I insert a x<>y before the final RTN, I still get the imaginary part in x, i.e. ix + y. With or without a x<>y before the final RTN, the displayed result is the same. 2) Only one complex root is solved correctly. As an example, if you try solving 5x² + 2x + 1 = 0, you get the following: Flag 1 is set with the imaginary part 0.4 in x, and the real part -0.2 in y. Upon R/S the second root (x = -0.2 - 0.4i) is not shown. Granted, all complex roots are of the form x = D ± Ei, so one can deduce the second root and it doesn't really matter I guess BUT... Can you suggest a better solution? Regards, Jeff K |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(42S) Short Quadratic Solver - Gerson W. Barbosa - 04-24-2014, 12:32 AM
RE: Short Quadratic Solver (HP-42S) - Jeff_Kearns - 05-25-2014, 03:30 PM
RE: Short Quadratic Solver (HP-42S) - Gerson W. Barbosa - 05-25-2014, 09:55 PM
RE: Short Quadratic Solver (HP-42S) --- and 32Sii?? - Jeff_Kearns - 05-27-2014, 05:30 PM
RE: Short Quadratic Solver (HP-42S) - Thomas Klemm - 05-27-2014, 06:57 PM
RE: Short Quadratic Solver (HP-42S) - Gerson W. Barbosa - 05-28-2014, 04:18 AM
RE: Short Quadratic Solver (HP-42S) - Jeff_Kearns - 05-28-2014 10:17 PM
RE: Short Quadratic Solver (HP-42S) - Gerson W. Barbosa - 05-29-2014, 04:23 AM
RE: Short Quadratic Solver (HP-42S) - Thomas Klemm - 05-29-2014, 05:10 AM
RE: Short Quadratic Solver (HP-42S) - Gerson W. Barbosa - 05-29-2014, 03:48 PM
RE: Short Quadratic Solver (HP-42S) - Jeff_Kearns - 05-30-2014, 03:56 AM
RE: Short Quadratic Solver (HP-42S) - Gerson W. Barbosa - 05-31-2014, 03:31 AM
|
User(s) browsing this thread: 2 Guest(s)