Texas Instruments TI-55
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 |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The TI-55 is one of the lower-end early Texas Instruments LED programmable calculators. My first encounter with this calculator was on the pages of a Texas Instruments book on microprocessor technology, a translation of which was published in Hungary in 1980 or thereabouts.
Lower-end or not, the TI-55 is still a decent little programmable calculator. In addition to the usual set of scientific and statistical functions, it has ten memory registers and 32 steps of program memory. (Registers 8 and 9 correspond with program steps 17-24, and 25-32, respectively, whereas registers 1-7 may be used by the built-in statistical functions.)
The most significant shortcoming of the TI-55 is the near complete lack of program control instructions. There is no GOTO, no conditional tests, nothing. However, the calculator's RST instruction, plus the fact that program execution stops when an error occurs, can be used to implement simple loops^{1}.
The limited capacity of this calculator does not make it possible to implement a complex algorithm like that of the Gamma function. However, a simple factorial program loop is certainly within the capabilities of this machine (well, yes, there's a built-in factorial function but where's the fun in using that?) Because the only way to stop a program conditionally is by generating an error condition (which displays the blinking value of 9.9999999e99), it is not possible to cause the result to be displayed when the program ends; it must be retrieved instead from memory (CLR RCL 0).
00 51 STO 01 01 1 02 34 1/x 03 61 RCL 04 01 1 05 55 × 06 51 STO 07 00 0 08 43 ( 09 61 RCL 10 01 1 11 65 - 12 01 1 13 44 ) 14 87 RST
Perhaps more elegant is to compute an approximation of the factorial using Stirling's formula. This method requires no iteration or conditional execution, so it's more suited for use with the TI-55. Here is a program that approximates the natural logarithm of the factorial (so it can be used for arguments greater than 69). This program is actually fairly accurate; calculating the factorial of 5 yields 119.99 instead of 120, for instance, which is not bad at all.
00 51 STO 01 00 0 02 55 × 03 02 2 04 55 × 05 49 π 06 85 = 07 23 lnx 08 45 ÷ 09 02 2 10 75 + 11 61 RCL 12 00 0 13 55 × 14 23 lnx 15 65 - 16 61 RCL 17 00 0 18 75 + 19 43 ( 20 61 RCL 21 00 0 22 34 1/x 23 45 ÷ 24 01 1 25 02 2 26 75 + 27 01 1 28 44 ) 29 23 lnx 30 85 = 31 86 R/S
^{1}One might suspect that as it is possible for a program to write into program memory by storing numbers in registers 8 and 9, it might be possible to implement conditional constructs using this method. Unfortunately, not all keycodes can be stored in program memory this way (and, it appears, some of the most important keycodes like R/S or RST, cannot), which severely limits the utility of this programming method. However, see this article by Claus Buchholz, which provides intriguing details.