Citizen SR-59

Datasheet legend
Ab/c: Fractions calculation
AC: Alternating current
BaseN: Number base calculations
Card: Magnetic card storage
Cmem: Continuous memory
Cond: Conditional execution
Const: Scientific constants
Cplx: Complex number arithmetic
DC: Direct current
Eqlib: Equation library
Exp: Exponential/logarithmic functions
Fin: Financial functions
Grph: Graphing capability
Hyp: Hyperbolic functions
Ind: Indirect addressing
Intg: Numerical integration
Jump: Unconditional jump (GOTO)
Lbl: Program labels
LCD: Liquid Crystal Display
LED: Light-Emitting Diode
Li-ion: Lithium-ion rechargeable battery
Lreg: Linear regression (2-variable statistics)
mA: Milliamperes of current
Mtrx: Matrix support
NiCd: Nickel-Cadmium rechargeable battery
NiMH: Nickel-metal-hydrite rechargeable battery
Prnt: Printer
RTC: Real-time clock
Sdev: Standard deviation (1-variable statistics)
Solv: Equation solver
Subr: Subroutine call capability
Symb: Symbolic computing
Tape: Magnetic tape storage
Trig: Trigonometric functions
Units: Unit conversions
VAC: Volts AC
VDC: Volts DC
Years of production:   Display type: Numeric display  
New price:   Display color: Black  
    Display technology: Liquid crystal display 
Size: 5"×3"×½" Display size: 10(8+2) digits
Weight: 3 oz    
    Entry method: Algebraic with precedence 
Batteries: 2×"LR44" button cell Advanced functions: Trig Exp Lreg Cmem BaseN Units 
External power:   Memory functions:
I/O:      
    Programming model: Partially merged keystroke 
Precision: 11 digits Program functions: Jump Cond  
Memories: 7 numbers Program display:  
Program memory: 45 program steps Program editing:  
Chipset:   Forensic result:  

sr59.jpg (22760 bytes)What an amazing find, this Citizen calculator. Although many companies manufactured hand-held calculators over the last four decades, very few ventured into the sophisticated area of programmable devices. Most programmable calculators are the product of giants such as Hewlett-Packard, Texas Instruments, Casio, and Sharp; those few that aren't are more often than not OEM versions of one of the giants' more popular models.

Not this one. Despite a superficial resemblence to some Texas Instruments models like the TI-57 LCD, this is definitely not an OEM TI model. This unique beast has an entirely different programming model.

When I received this machine yesterday, at first I was terribly disappointed. I inserted a set of new batteries and turned the machine on, only to get some meaningless symbols on its display. Although I was able to ascertain that the machine was responding to keystrokes, the damage to its display or display control circuit seemed irreversible. But I don't give up that easily; eventually, I was able to find the cause! I have, in fact, encountered this problem before in a TI-68: a flexible circuit ribbon that connects the display to the main circuit board is attached using conducting adhesive, which loses some of its strength over the years. This time around, I was able to fix the problem (at least temporarily) without removing the circuit ribbon, by simply rubbing the contact pads with sufficient strength.

The SR-59 has 45 program steps, divided into two program areas. There is no way to review or edit a program once entered; changes can be made only by reentering the program. The machine has the most unusual control transfer instruction: both unconditional jumps (GOTO) and conditional jumps (comparisons with zero or the contents of a memory register) use relative addressing, capable of transferring control only within plus or minus 9 steps of the current program location. However, control transfer instructions are merged (so for instance, INV GOTO +/- 9 uses only one program step), making this programming model more efficient than that of many other similar sized calculators.

The handbook that comes with this model demonstrates the use of conditional transfers via an implementation of the factorial. However, that implementation is terribly inefficient, badly written. Here is another way to do it (yes, the calculator does have its built-in factorial function but writing one is so much more fun!):

01:  STO
02:  1
03:  X
04:  (
05:  RCL
06:  1
07:  -
08:  1
09:  )
10:  x>0 -9
11:  1
12:  =

The Gamma function is too much of a challenge for this small machine. However, even with the previous factorial program in memory, there's enough room left to enter an implementation of Stirling's formula into the secondary program area:

01:  yx
02:  STO
03:  1
04:  ÷
05:  RCL
06:  1
07:  ex
08:  ×
09:  (
10:  2
11:  ×
12:  π
13:  ×
14:  RCL
15:  1
16:  )
17:  √
18:  ×
19:  (
20:  1
21:  +
22:  1
23:  ÷
24:  1
25:  2
26:  ÷
27:  RCL
28:  1
29:  =

Okay, I said that the Gamma function is too much of a challenge, but maybe I was wrong after all. As it turns out, it is possible (just barely!) to squeeze an implementation of the incomplete Gamma function into the memory of this little machine. Or not so little, then. This puts the SR-59 into the same league with the TI-57 or the Commodore PR-100. Wow!

To use this program, enter the integration limit, his MS, then enter the argument, and hit RUN. For instance, if you type 30 MS .5 RUN, after a couple of minutes (yes, the iteration takes a little time) the square root of pi should appear on the display, which of course is none other but the Gamma function of 0.5.

01:  STO
02:  2
03:  MR
04:  STO
05:  1
06:  yx
07:  RCL
08:  2
09:  ÷
10:  RCL
11:  1
12:  ex
13:  ÷
14:  RCL
15:  2
16:  =
17:  STO
18:  3
19:  MS
20:  RCL
21:  3
22:  ×
23:  RCL
24:  1
25:  ÷
26:  (
27:  GOTO 1
28:  GOTO -9
29:  RCL
30:  2
31:  +
32:  1
33:  )
34:  STO
35:  2
36:  GOTO 1
37:  GOTO -9
38:  +
39:  STO
40:  3
41:  MR
42:  =
43:  x<=M 1
44:  GOTO -7
45:  MR