Post Reply 
Even faster quadratic formula for the HP-41C
06-04-2014, 05:59 AM (This post was last modified: 06-04-2014 06:25 AM by Gerson W. Barbosa.)
Post: #3
RE: Even faster quadratic formula for the HP-41C
(06-04-2014 05:32 AM)Thomas Klemm Wrote:  
Code:
00 { 22 Byte-Prgm }
01 LBL "Q"
02 X<> ST Z 
03 STO/ ST Z
04 STO+ ST X
05 /
06 ENTER
07 X^2
08 RCL- ST Z
09 SQRT
10 -
11 +/-
12 STO/ ST Y
13 END

x₂ is computed using this well-known property:

\[x_{1}\cdot x_{2}=\frac{c}{a}\]

Cheers
Thomas

Thomas,

I fear there might be trouble when c = 0. Also, the HP-41 lacks recall arithmetic.
Anyway, records exist to be broken. I won't be surprised if you or someone else comes up with a shorter (or a lower byte-count) HP-41 or 42S program.

Cheers,

Gerson.

P.S.: On the HP-42S, replace line 10 with

10 +

P.P.S.: This won't solve the case when both b and c are zero, however.
Find all posts by this user
Quote this message in a reply
Post Reply 


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



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