## Sunday, September 17, 2023

### Filling the Memory of a Casio fx-4000P

Filling the Memory of a Casio fx-4000P

How many programs does it take to fill the 550 step memory?   Here are six programs that pretty much does the job.   I purposely aimed for descriptive prompts and messages.

Here's are the six programs:

Prg 1:  Approximating the cumulative distribution function of the Normal Curve - to 3 decimal places

Mode +:  COMP,  Number of Steps: 82

"Z≥0" : ?→Z : Fix 3 : 1 - ((1+.196854 Z +.115194 Z² + .000344 Z^3 + .019527 Z^4)^ -4) ÷ 2 : Rnd : Norm : "AREA=" ◢ Ans → A

Source:  Abramowitz and Stegun, Handbook of Mathematical Functions. 1972.

Examples:

Z = 1.6

Results:  AREA = 0.945

Z = 1

Results:  AREA = 0.841

For best results, enter a positive Z.

Prg 2:  Binomial Distribution PDF with Mean and Variance

Mode +: COMP, Number of Steps: 86

"P(WIN)" : ?→P : "TRIALS" : ?→T : "WINS" : ?→N : "PDF=" ◢ T nCr N × P x^y N × (1-p) x^y (T-N) ◢ "MU=" ◢ T P  ◢ "VAR=" ◢ Ans (1 - P)

Note:  The combination function, nCr, is shown on the screen as a lone solid C.  I have the nCr for clarification.

P(WIN):  probability of a successful event

TRIALS:  number of events

WINS:  number of successful events

PDF:  probability of we get the number of successful events

MU:  expected value, mean - depending on P(WIN) and TRIALS

VAR:  variance - depending on P(WIN) and TRIALS

Example:

P(WIN) = 0.7,  TRIALS = 25, WINS = 10

Results:  PDF = 1.324897424 x 10^-3, MU= 17.5, VAR= 5.25

Prg 3:  Angles of a triangle given 3 side lengths in Degrees - Solve a SSS (side-side-side) Triangle

Mode +: COMP,  Number of Steps: 86

Deg : "A" : ?→A : "B" : ?→B : "C" : ?→C : "<A=" ◢ cos^-1 ((A² + B² - C²) ÷ (-2 B C))  → D ◢ "<B=" ◢ sin^-1(B sin D ÷ A) → E ◢ "<C=" ◢ 180-D-E→F

Angle <A  (stored in D) is opposite of side with length A

Angle <B (stored in E) is opposite of side with length B

Angle <C (stored in F) is opposite of side with length C

Degrees mode is set in the program.

Example:

Triangle with lengths A = 24, B = 60, C = 44

Results:  <A = 20.04997572,  <B = 58.99241697, <C = 100.9576073

Prg 4:   Free Fall with Air Resistance (from Ke!san)

Assume coefficient is standard at k = 0.24 kg/m

(angle is not needed, hyperbolic trig does not depend on angle unit)

(last retrieved:  February 27, 2023)

Mode +:  COMP,  Number of Steps:  88

.24 → K : 9.80665 → G : "MASS" : ?→M : "DIST" : ?→D : √(M ÷ G ÷ K) → X : "TIME=" ◢

X cosh^-1 (e(D K ÷ M)) → T ◢ "VEL=" ◢ X G tanh(T ÷ X) → V

SI units are assumed.

Example:

MASS = 68 kg, DIST (free fall distance) = 1874 m

Results:  TIME = 39.27745305 s, VEL (velocity at free fall) = 52.71191359 m/s

Prg 5:  Sums of 1 to n for k, k^2, k^3, and K^4

Mode +:  COMP, Number of Steps:  83

"1 TO..." : ?→N : "K =" ◢ N (N+1) ÷ 2 → S ◢ "K²=" ◢ S (2 N + 1) ÷ 3 → T ◢

"K◢3=" ◢ S² → U ◢ "K◢4=" ◢ T (3 N² + 3 N - 1) ÷ 5 → V

The power character, x^y can not be used in a string or an error occurs.  The stop character, ◢, can be used.

K:   Σ (K from K = 1 to K = N)

K²:  Σ (K^2 from K = 1 to K = N)

K◢3:  Σ (K^3 from K = 1 to K = N)

K◢4:  Σ (K^4 from K = 1 to K = N)

Example:

N = 9

Results:

K:  45

K²:  285

K◢3:  2025

K◢4:  15333

Prg 6:  Simple Ohm's Law Wheel/Volts, Current, Resistance:  "PIE" chart

Mode +:  COMP, Number of Steps: 121

Lbl 0 : "ENT 0 TO SLV" ◢ "I" ◢ ?→I : "V" ◢ ?→ V : "R" ◢ ?→R : I=0 ⇒ Goto 1 : V=0 ⇒ Goto 2:  R=0 ⇒ Goto 3: Goto 0:  Lbl 1:  "I="  ◢ V ÷ R → I ◢ Goto 4: Lbl 2: "V=" ◢ I R → V ◢ Goto 4: Lbl 3: "R=" ◢ V ÷ I → R ◢ Lbl 4: "END"

I:  current (amps, A)

V: voltage (volts, V)

R:  resistance (ohms, Ω)

The inputs will be in this order.  Enter a zero for the variable you want to solve for.

Examples:

Solve for I:  I = 0, V = 12, R = 3

Result:  I = 4

Solve for V:  I = 20, V = 0, R = 30

Result:  V = 600

Solve for R:  I = 17, V = 120, R = 0

Result:  R ≈ 7.05

Total Number of Programs: 6

Total Steps Used: 121 (I only have 4 left)

Eddie

All original content copyright, © 2011-2023.  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.