Hi,
I made a few simple programs for the HP 35s which make it a little bit better imho :)
I tried to let each one keep as much of the original stack as possible intact, this didn't succeed for every function however.
There are: extract im/re, ->R, ->P, lambertw, complex loggamma, complex conjugate, complex asin/acos/atan and complex sqrt.
They're almost all located on or near a key where either a function is similar, or the letter is a good mnemonic.
The polar/rect and lambertw ones were inspired by posts from here but made simpler.
What do you think of the programs?
Got any tips to improve them?
Are there any HP-35s related resources for other useful programs or programming tips and techniques? I found the Matrix Multitool which is very nice, but for the rest I only find surveying related programs...
Any ideas for *games* that can be programmed on a device like this?
Thanks!
//Get re in x and im in y. Located on the imaginary number key.
lbl g
eqn: abs(regx-sq(abs(regx))/regx)/2
x<>y
1/x
clx
eqn: abs(lastx+sq(abs(lastx))/lastx)/2
rtn
//Complex conjugate, on the +/- key
lbl n
1/x
clx
sq(abs(lastx))/lastx
rtn
//LambertW, on the W key. Makes a mess of the stack.
lbl w
sto j
fn= v
solve i
rollup
x<>y
rtn
//LambertW helper function (too bad this costs a whole label, why can't you give line numbers to SOLVE??)
lbl v
rcl i
e^x
lastx
*
rcl j
-
rtn
//Polar to rect, on the R key representing ->R
lbl r
eqn: regy*sin(regx)
enter
eqn: regx*cos(regy)
rtn
//Rect to polar, on the S key because it's next to the R. Unfortunately lets the oldest stack value get lost.
lbl s
i
*
+
arg
lastx
abs
rtn
//Complex loggamma, on the z key which is above '!'.
lbl z
1/x
clx
eqn: 0.918938533205+(lastx-0.5)*ln(lastx)-lastx+1/(12*lastx)-1/(360*lastx^3)+1/(1260*lastx^5)
rtn
//Square root of complex numbers, on the square root key
lbl k
1/x
clx
eqn: lastx^0.5i0
rtn
//Complex asin, on the sin key (why doesn't it support this by default anyway?)
lbl h
1/x
clx
eqn: -i*ln(i*lastx+(1-lastx*lastx)^0.5i0)
rtn
//Complex acos, on the cos key
lbl i
1/x
clx
eqn: -i*ln(lastx+((lastx*lastx-1)^035i0))
rtn
//Complex atan, on the tan key
lbl j
1/x
clx
eqn: 0.5*i*ln((1-i*lastx)/(1+i*lastx))
rtn