Post Reply 
(42S) Short Quadratic Solver
05-27-2014, 06:57 PM
Post: #5
RE: Short Quadratic Solver (HP-42S)
(05-27-2014 05:30 PM)Jeff_Kearns Wrote:  Can you think of a way of dramatically shortening it, (...) so that it still gives real and complex roots?

Copied most of it from here: Short quadratic solver (HP-15C)
Code:
Q01 LBL Q
Q02 ENTER
Q03 R^
Q04 /
Q05 R^
Q06 LASTx
Q07 /
Q08 2
Q09 +/-
Q10 /
Q11 ENTER
Q12 ENTER
Q13 x^2
Q14 R^
Q15 -
Q16 SQRT
Q17 ENTER
Q18 +/-
Q19 CMPLX-
Q20 RTN

Doesn't give you the complex solution but that should be easy to add. There are probably shorter solutions possible by using a register.

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Short Quadratic Solver (HP-42S) - Thomas Klemm - 05-27-2014 06:57 PM



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