What this page is about
I set up this page to see if I could find any other HP32/HP32S/HP32SII
enthusiasts (that is, geeks). I had a great HP-15C when I was
in University, but alas, I could not find another when it came
time to buy a new calculator (I sold the 15C like an idiot).
The HP32SII seemed to fit my bill. It was RPN, programmable,
and had a lot of the same features of the HP15C.
Euclid's Algorithm for the Greatest Common Divisor
; This is an HP-32S version of Euclid's Algorithm to find the greatest common divisor.
; You run this by putting the two numbers for which you want to find the GCD and pressing "XEQ E"
; I'm modifying this to put the non-shifted
; key in brackets next to the shifted key
; to make it less confusing. (Thanks, Stefan)
; Where I say oShift, I mean hit the orange shift key first
; Where I say bShift, hit the blue shift key first
E01 LBL E ;[oShift +]
E02 STO A
F01 LBL F ;[oShift +]
; Divide y register by x register
; Get the Fractional part
F03 FP ;[bShift square root]
F04 RCL A
; Multiply the fractional part by the first number you put in
F07 x>y? ;[oShift ÷] then select >
F08 GTO G ;[oShift XEQ]
F10 PSE ;[bShift R/S]
; Exchange the x-register with STOrage A
F11 x <-> A ;[bShift x<->y] (next to ENTER)
F12 RCL A
F13 GTO F ;[oShift XEQ]
G01 LBL G
G02 RCL A