Post Reply 
Even faster quadratic formula for the HP-41C
06-04-2014, 04:25 AM (This post was last modified: 06-04-2014 04:52 AM by Gerson W. Barbosa.)
Post: #1
Even faster quadratic formula for the HP-41C
This is yet another attempt at finding a shorter (but not necessary faster) quadratic formula program for the HP-41C, while preserving the stack register T (Thanks to Jeff Kearns - if it were not because of his interest, I wouldn't have taken a second look at this old thread)

Code:
01 LBL 'Q
02 X<> Z 
03 CHS
04 ST/ Z
05 ST+ X
06 /
07 STO Z
08 X^2
09 +
10 SQRT
11 RCL Y
12 ST+ Z
13 +
14 ST- Y
15 END

x₂ is computed using this well-known property:

\[x_{1}+x_{2}=-\frac{b}{a}\]

Real roots only, but since the stack register T is preserved it will solve the first example for the HP-42S program here.

I'd rather present it here first, before submitting it to the HP-41C Software Library, as any issue I might have overlooked would surely be pointed out soon. Thanks!

Gerson.

PS.: The title should read ...faster quadratic formula program... - as the formula is essentially the same, but I cannot edit it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Even faster quadratic formula for the HP-41C - Gerson W. Barbosa - 06-04-2014 04:25 AM



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