Casio fx-3900Pv

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: 1992  Display type: Numeric display  
New price:   Display color: Black  
    Display technology: Liquid crystal display 
Size: 6"×3"×½" Display size: 10+2 digits and 5 characters
Weight: 3 oz    
    Entry method: Algebraic with precedence 
Batteries: 1×"CR-2025" Lithium Advanced functions: Trig Exp Lreg Intg Cmem 
External power:   Memory functions: +/-/×/÷ 
I/O:      
    Programming model: Fully-merged keystroke entry 
Precision: 11 digits Program functions: Cond  
Memories: 7 numbers Program display: Mnemonic display  
Program memory: 300 program steps Program editing: Auto-insert program entry  
Chipset:   Forensic result: 9.0001252458  

fx3900pv.jpg (24776 bytes)To my no small pleasure, lately I began receiving Casio programmable calculators that significantly improve upon the programmability of their predecessors. Although the programming model is still unduly simplistic (the only kind of branching possible is a conditional jump back to the beginning of program space), these calculators offer more program memory and, most significantly, the ability to review and edit programs.

With 300 bytes to play with, I was able to write several implementations of my favorite programming example, the Gamma function for this machine. The example reproduced below uses Stirling's formula and a simple iteration to produce an accurate result even for small or negative arguments:

001 Kin 1
002 ×
003 (
004 Kout 2
005 -
006 Kout 3
007 +
008 1
009 Kin 3
010 )
011 =
012 Kin 2
013 5
014 Min
015 Kout 1
016 +
017 1
018 =
019 x<=M
020 Kin 1
021 ×
022 LN
023 -
024 Kout 1
025 +
026 (
027 2
028 ×
029 π 
030 ÷
031 Kout 1
032 )
033 LN
034 ÷
035 2
036 +
037 (
038 (
039 (
040 (
041 1
042 1
043 8
044 8
045 1/x
046 ÷
047 Kout 1
048 x²
049 -
050 1
051 6
052 8
053 0
054 1/x
055 )
056 ÷
057 Kout 1
058 x²
059 +
060 1
061 2
062 6
063 0
064 1/x
065 )
066 ÷
067 Kout 1
068 x²
069 -
070 3
071 6
072 0
073 1/x
074 )
075 ÷
076 Kout 1
077 x²
078 +
079 1
080 2
081 1/x
082 )
083 ÷
084 Kout 1
085 -
086 0
087 Kin 3
088 X-K2
089 LN
090 =