Re: HP 15C Programming Tutorial Posted Message #3 Posted by Thomas Klemm on 14 Dec 2011, 12:40 p.m., in response to message #1 by Eddie W. Shore
The comparison of the two methods to enter complex numbers confused me slightly because in the first example you start with a stack [x y z t], enter a and b and end up with [a+ib x y y], while in the second example you start with [y z t ?]. Why? I'd start with [x y z t] as well and end up with [a+ib x y z] instead.
As I always considered the stack as the interface to communicate with the calculator I don't esteem your solution to solve the quadratic equation much. You can do it without storing any numbers into registers. See message 2 in:
Short quadratic solver (HP15C)
To solve your first example you'd just enter the three coefficients of the quadratic equation and run the program:
2
ENTER
3
I
3
CHS
ENTER
4
CHS
I
2
Re<>Im
E
Both solutions are now on the stack. You can use x<>y and (i) to display them. Bonus: the same program can also be used for real coefficients.
Kind regards
Thomas
Edited: 14 Dec 2011, 12:44 p.m.
