Saturday, June 26, 2021

7000G Retro Month - June 26 Edition

7000G Retro Month - June 26 Edition





Introduction


Welcome to the 7000G Retro Month, which features programming for the classic Casio calculators from the mid/late 1980s:  primarily fx-7000G and fx-7500G.  Since the programming language stays similar throughout the years, programs can be translated to the fx-6300G and later graphing calculators with little to no adjustments.  Non graphic programs should be ported to the fx-4000P, fx-4500P (A), fx-3650p (II), fx-50F Plus (II), and fx-5800P with little to no adjustments.  


7000G Retro Month takes place every Saturday during June 2021.


To make text easier to type, I can going to use the following text friendly symbols for the following:


->  for →


/I for ⊿


=> for ⇒


What do you think?   Unicode or simple text equivalents?  


- - - - - - -- - -- - -


Today's subject revolves around Calculus.  Enjoy!


- - - -- - - -- - -- -- -


The three programs listed here call another program as a subroutine.  I use Prog 0 as a subroutine.  


Prog 0 


[insert f(x) here]



Example:  Prog 0 contains X^2+4.   The results gets stored in in Ans.  


Sum


S = ∑( f(x), X = A to B)


"A"? -> A

"B"? -> B

A -> X

0 -> S

Lbl 1

Prog 0

Ans + S -> S

X + 1 -> X

X≤B => Goto 1

S


Numeric Derivative - Simple Approximation


f'(x) ≈ (f(x+h) - f(x-h))/(2h),  h = tolerance (default to 10^-5)


The derivative is stored in the variable D. 


"X0"? -> Z

Z+10^-5 -> X : Prog 0 : Ans -> A

Z-10^-5 -> X : Prog 0 : Ans -> B

(A-B)÷(2 10^-5) -> D


Definite Integral - Simpson's Rule


∫ f(x) dx ≈ h/3 * (y_a + ∑(4*y_odd + 2*y_even) + y_b)

where h=(b-a)/n   (n is even)


The integral is stored in the variable I.


"A"? -> A 

"B"? -> B

"N"? -> N

A -> X

Prog 0

Ans -> I

(B-A)÷N -> D

N÷2 -> K

Lbl 2

X+D -> X : Prog 0 : I + 4 Ans -> I

X+D -> X : Prog 0 : I + 2 Ans -> I

K - 1-> K

K≠0 => Goto 2

B -> X : Prog 0 : (I - Ans)D÷3 -> I



Eddie


All original content copyright, © 2011-2021.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


  Casio fx-7000G vs Casio fx-CG 50: A Comparison of Generating Statistical Graphs Today’s blog entry is a comparison of how a hist...