Tandy EC-4020 calculator programmes

From Wikistix

Bunch of little programmes I've written for my old Tandy EC-4020 programmable calculator (a re-badged Casio fx-4000P).

Calculate π[edit]

Calculate π using the Gauss–Legendre algorithm. Converges past the calculators accuracy in about 3 iterations.

Lbl 0:(A+B)÷2→G:√(AB)→B:T-P(A-G)²→T:2P→P:G→A:(A+B)²÷4÷T◢Goto 0

Misinformation found herein copyright Paul Ripke (aka “stix”) stixpjr@gmail.com.