Showing posts with label Casio fx-4000P. Show all posts
Showing posts with label Casio fx-4000P. Show all posts

Saturday, March 28, 2026

Casio fx-4000P: Antennas

Casio fx-4000P: Antennas



Vertical and Horizontal Bandwidth


Given the height (h) and length (l) of an antenna plate, along with wavelength (λ) given from the antenna, the vertical and horizontal bandwidth, in degrees is calculated as:


Vertical Bandwidth:

ßv = (k * λ * 180) ÷ (h * π)


Horizontal Bandwidth:

ßh = (k * λ * 180) ÷ (l * π) = h * ßv ÷ l


The constant k is the antenna taper factor, which in the original program assigned the constant as k = 1.4.


Casio fx-4000P Program Code (Prog 0)


“HEIGHT” : ? → H :

“LENGTH” : ? → L :

“WAVE. L.” : ? → W :

“VERT-BAND=” ◢

252 × W ÷ H ÷ π → V ◢

“HOR-BAND=” ◢

H × V ÷ L → Z


Example 1:

Input: H: 2.4 ft (height), W: 12.4 ft (width), λ: 0.18 ft (wavelength)

Results:

Vertical Bandwidth: 6.016056849°

Horizontal Bandwidth: 1.1643981°


Example 2:

Input: H: 3.8 ft (height), W: 3.6 ft (width), λ: 0.05 ft (wavelength)

Results:

Vertical Bandwidth: 1.05544857°

Horizontal Bandwidth: 1.114084602°



Convert from Frequency to Wavelength


This program converts frequency (Hz) to wavelength (ft).


λ = c ÷ f


Using c as the speed of light in a vacuum (299,792,458 m/s), a conversion is required (1 m ≈ 3.28084 ft).


Casio fx-4000P Program Code (Prog 1)


“FREQ” : ? → F :

“WAVE L.=” ◢

299792458 ÷ F × 3.28084



Example 1:

Input: freq = 6200 MHz (6200E6)

Results: 0.158640498 ft



Example 2:

Input: freq = 8500



Equivalent Antenna Area



The equivalent area given the gain of the antenna in decibels (dB):



Ae = (λ² * 10^(G ÷ 10)) ÷ (4 * π)



Casio fx-4000P Program Code (Prog 2)



“GAIN” : ? → G :

“WAVE L.” : ? → W :

“AREA=” ◢ W² × 10^(G ÷ 10) ÷ 4 ÷ π → A



Example 1:

Input: gain = 28 dB, λ = 0.12 ft

Results: 0.7230238578 ft²



Example 2:

Input: gain = 49 dB, λ = 0.19 ft

Results: 228.1903833 ft²



Source


Hewlett Packard. HP-67/HP-97: Users’ Library Solutions: Antennas. Rev. D April 1979. pp. 32 – 26.



Eddie


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

Saturday, December 9, 2023

Swiss Micros DM32 and Casio fx-4000P: Prime Factorization

Swiss Micros DM32 and Casio fx-4000P:   Prime Factorization



Introduction 



On March 22, 2017, I posted a prime factorization program for the HP 15C:


https://edspi31415.blogspot.com/2017/03/hp-15c-prime-factorization.html



Today's blog is a port for the:


* Swiss Micros DM32 (and HP 32SII family)

* Casio fx-4000P



Swiss Micros DM32 Code:  Prime Factorization



Instructions:


1.  Enter a positive integer on the X stack. 

2.  Run the program (XEQ P) and a prime factor is displayed.  Press [ R/S ] to continue.  At this point the calculator is set to FIX 0 mode.   Repeat step 2.

3.  The program ends when the integer reappears.  The calculator is reset to FIX 4.  


3 labels are needed.



P01  LBL P

P02  FIX 0

P03  STO B

P04  STO A

P05  2

P06  STO F


B01  LBL B

B02  RCL A

B03  RCL÷ F

B04  ENTER

B05  FP

B06  x=0?

B07  GTO A

B08  1

B09  STO+ F

B10  GTO B


A01  LBL A

A02  RCL F

A03  STOP

A04  R↓

A05  R↓

A06  STO A

A07  1

A08  -

A09  x≠0?

A10 GTO B

A11 RCL B

A12 FIX 4

A13 RTN



Labels used:  P, B, A

Variables:  F (factor), A, B





Casio fx-4000P Code: Prime Factorization



Instructions:


1.  Run program (P#) in RUN Mode (Mode 1).  

2.  Enter a positive integer at the "N?" prompt.  

3.  A prime factor is displayed.  Press [ EXE] to continue. Repeat step 3.

4.  The program ends when the integer reappears.  



"N" : ? → N : N → T : 2 → F : 

Lbl 3 : Frac( T ÷ F ) = 0 ⇒ Goto 2 :

F + 1 → F : Goto 3 :

Lbl 2 : F ◢ T ÷ F → T : T - 1 ≠ 0 ⇒ Goto 3 : N


Variables:  N, T, F  




Examples


26:  2, 13, 26   (26 = 2 × 13)


89:  89   (89 is prime)


175:  5, 5, 7, 175   (175 = 5^2 × 7)


1020:  2, 2, 3, 5, 17, 1020  (1020 = 2^2 × 3 × 5 × 17)




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. 


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. 


Spaces are added for readability.  


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)


Site:  https://keisan.casio.com/exec/system/1231475371

(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. 


Sunday, April 16, 2023

Python and Casio fx-4000P: Transmission and Deviation Angles - Prism

Python and Casio fx-4000P:   Transmission and Deviation Angles - Prism




Celebrating 12 Years in the Blogopshere!   Thank you to my readers, subscribers, and everyone who has stopped by during the years!  




Introduction


Today's program calculates the transmission and deviation angles passing through a prism.   The refractive index of the prism is determined by the material it is made of.   





Formulas Used for the transmission and deviation angles, respectively:


θt = arcsin( α * √(n^2 - sin^2 θi) - sin θi * cos α)


δ = θi + θt - α


The Python program calculates for prisms made of acrylic, glass, fluorite, and plastic.  



Python Script:  prism.py


Program Notes:


1.  The angle mode in Python is always radian angle mode. Conversions between degrees and radians are necessary on this code.


2.  This code was programmed with a Casio fx-9750GIII in the Python app.   I could have used the degrees and radians functions, however, they were not present in the calculator's catalog.  


3.  I used a While loop and initialized the choice variable k as -1 to prevent the user from choosing anything from picking outside the range 0-3.  This simulates the Menu command in Casio graphing calculator programming.


4. The refractive indices are average and approximate.  


5. To make everything fit on the screen, the new line escape character, \n, is used.  


Code:


from math import *

# radians mode

print("Enter in Degrees")

i=float(input("Incidence Angle? \n"))

a=float(input("Top Angle? \n"))


# convert to radians

ir=i*pi/180

ar=a*pi/180


# choice of material

# refractive index

ls=[1.4905,1.52,1.433,1.58]

k=-1

while k<0 or k>3:

  print("Select Material")

  print("0. Acrylic")

  print("1. Glass")

  print("2. Fluorite")

  print("3. Plastic")

  k=int(input())

n=ls[k]


# calculation

t=asin(sin(ar)*sqrt(n**2-sin(ir)**2)-sin(ir)*cos(ar))

d=ir+t-ar


# convert to degrees

td=t*180/pi

dd=d*180/pi


# results

print("Results are in Degrees")

print("Transmission Angle: \n"+str(td))

print("Deviation: \n"+str(dd))



Casio fx-4000P Program:  Prism


Notes:


1.  Variables used:

I = incidence angle

A = top angle of the prism

N = refractive index, must be entered manually


2.  Outputs:

Transmission Angle (T)

Deviation Angle (D)


Code:

(59 steps)


Deg :

"I": ?→ I:

"A": ?→A:

"N": ?→N:

sin⁻¹ ( sin A × √( N² - (sin I)²) - sin I × cos A) → T ◢

I + T - A → D



Examples


I = incidence angle

A = top angle of the prism

T = Transmission Angle

D = Deviation Angle



1.  I = 50°, A = 60°,  Glass (1.52)


T ≈  48.932708276°

D ≈ 38.932708276°


2.  I = 10°, A = 45°, Plastic (1.58)


T ≈ 80.99437617°

D ≈ 45.99437617°


3.  I = 33°, A = 25°,  Acrylic (1.4905)


T ≈ 5.32137979°

I ≈ 13.32137979°


4.  I = 17°, A = 40°, Fluorite (1.433)


T ≈ 42.66957975°

I ≈ 19.66957975°



Source


Woan, Graham.  The Cambridge Handbook of Physics Formulas  Cambridge University Press.  Cambridge, New York.  2003 edition



Here is to many more years, 


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. 


Saturday, February 11, 2023

Sum and Product Problem with the Casio fx-4000P

Sum and Product Problem with the Casio fx-4000P



The Sum and Product Problem


For the numbers a and b with the sum s, and product p:


a + b = s

a * b = p


Let's find a solution for a and b:


a + b = s

b = s - a


a * b = p

a * (s - a) = p

a * s - a^2 = p

0 = a^2 - a * s + p


a = (s ± √(s^2 - 4 * p))/2


Then:


b = s - a

= s -  (s ± √(s^2 - 4 * p))/2

= (2*s)/2 -  (s ± √(s^2 - 4 * p))/2

= (2*s -s ±√(s^2 - 4 * p))/2

=  (s ± √(s^2 - 4 * p))/2


Note that addition and multiplication are communitive.  


Without loss of generality, let:


a = (s + √(s^2 - 4 * p))/2


b = (s - √(s^2 - 4 * p))/2


Verification:


a + b 

= (s + √(s^2 - 4*p))/2 + (s - √(s^2 - 4*p))/2

= (s + √(s^2 - 4*p) + s - √(s^2 - 4*p))/2

= (2 * s)/2

= s


a * b

= (s + √(s^2 - 4 * p))/2 * (s + √(s^2 - 4 * p))/2

= (s/2)^2 - (√(s^2 - 4 * p)/2)^2

= s^2/4 - (s^2 - 4 *p)/4 

= (s^2 - s^2 + 4 * p)/4

= (4 * p)/4

= p



Casio fx-4000P Program:  Sum and Product Problem


This program can be adopted to many programming and graphing calculators. 


Program:


"A+B=":?→S:

"AB=":?→P:

(S+√(S²-4P))÷2→A◢

S-A→B



Examples


S:  Sum

P:  Product


Example 1:

S = 12, P =32;

Results: 8, 4


Example 2:

S = 8, P = 15;

Results: 5, 3



Enjoy!  Until next time,


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. 

 

Saturday, May 28, 2022

Casio fx-4000P: Orthonormal 2D Vector Test

Casio fx-4000P:  Orthonormal 2D Vector Test


Introduction


A set of vectors form an orthonormal basis if the vectors are mutually perpendicular and are of unit length.  


Mutual perpendicular means the dot product of two different vectors in the space is 0:


v_i ∙ v_j = 0,  i ≠ j


Unit length means that the norm of each vector is 1:


|v_i| = 1



 For two 2D vectors [ A, B ] and [ C, D ], the two vectors form an orthonormal basis if:


A^2 + B^2 = 1

C^2 + D^2 = 1

A * D + B * C = 0


Casio fx-4000P Program:  Orthonormal 2D Vector Test

Bytes:  84 steps

(line returns are included for readability)


"A":

?→A:

"B":

?→B:

"C":

?→C:

"D":

?→D:

A²+B²≠1⇒Goto 0:

C²+D²≠1⇒Goto 0:

AD+BC≠0⇒Goto 0:

"YES" ⊿

Goto 1:

Lbl 0:

"NO" ⊿

Lbl 1


Examples


Example 1:

[1, 0], [0, 1]

A = 1, B = 0, C = 0, D = 1


"NO"   (1*1 - 0*0 = 1)


Example 2:

[1/√2, 1/√2], [1/√2, -1/√2]

A = 1/√2, B = 1/√2, C = 1/√2, D = -1/√2


"YES"


Source:


Rowland, Todd. "Orthonormal Basis." From MathWorld--A Wolfram Web Resource, created by Eric W. Weisstein. https://mathworld.wolfram.com/OrthonormalBasis.html

Last Accessed April 7, 2022


Eddie 


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


Sunday, May 22, 2022

Converting a Line in Parametric Line to a Function Line

Converting a Line in Parametric Line to a Function Line 


From (x(t), y(t)) to y(x)


Express a line, presented in parametric form:


x = A * t + B

y = C * t + D


where A, B, C, and D are constants, and convert it to function form (y(x) or f(x)).


Here is one way to do this:


x = A * t + B

A * t = x - B

t = x / A - B / A


y = C * (x / A - B / A) + D

y = (C/A) * x - B*C/A + D

y = (C/A) * x + (D - B*C/A)


We know have a function in the slope-intercept form where:


slope = C/A


intercept = D - B*C/A


Casio fx-4000P Program:  Converting Parametric Lines to Functional Line

Size:  77 bytes

(line breaks added for readability)


"X=AT+B; A":

?→A:

"B":

?→B:

"Y=CT+D; C":

?→C:

"D":

?→D:

"SLOPE="⊿

C÷A→M⊿

"ITC="⊿

D-B×M→I


Examples


Graph screens are created by the Numworks emulator:  https://www.numworks.com/simulator/


Example 1:

x = 3 * t  - 4 

y = 2 * t + 8


A = 3, B = -4, C = 2, D = 8


Results:

SLOPE = 0.666666667

ITC = 10.66666667






Example 2:

x = -2 * t + 6

y = 4 * t + 3


A = -2, B = 6, C = 4, D = 3


Results:

SLOPE = -2

ITC = 15





Hope you find this useful.  Take care,


Eddie 


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


Monday, February 14, 2022

Retro Review: Casio fx-4000P

Retro Review:   Casio fx-4000P





Quick Facts:


Model:  fx-4000P

Company:  Casio

Years:  1985 - 1989

Battery:  2 x CR2032

Display:  10 digits, 2 digit exponent

Logic:  Algebraic - type in expressions the way you write them

Memory:  Up to 550 programming steps or up to 94 memory registers

Contrast Wheel

Wallet with operation guide (if included, depends on where you buy from)


The Casio fx-4000P holds up its value as it is a popular vintage programming calculator. Prices are about $30 US and above.  

 

Features


Four Basic Modes:


* COMP:  Computer Mode, general calculations


* BASE-n:  Base conversions in the standard four bases decimal, binary, octal, and hexadecimal.  Boolean functions and, or, not, and neg are included.   Binary numbers have a 32 bit capacity, in 4 blocks of 8 each.  


*  SD:  Single Variable statistics


*  LR:  Linear Regression, y = A + Bx


Statistics Variables:

U = Σx^2

V = Σx

W = n

P = Σy^2

Q = Σy

R = Σxy


A = y-intercept

B = slope

r = correlation


As with many Casio calculators, the rectangular and polar conversions store their results in two variables.   For the fx-4000P:


Pol(x,y) stores r in I, Θ in J

Rec(r,Θ) stores x in I, y in J


This is the same as the Casio current fx-5800P.  


The fx-4000P has integer part (Int), fractional part (Frac), and absolute value (Abs).  


Memory and Arrays


The Defm mode allows the user to set the number of memory registers.   The minimum amount of memory registers is 26 (A - Z).   The user can add additional registers at a cost of 8 programming steps each, up to 94 memory registers (leaving only 6 programming steps).   


The fx-4000P allows for indirect storage, which takes the form of:


letter[# of steps from that letter]


For example:

A[0] returns what is stored in A,

A[1] returns what is stored in B,

A[2] returns what is stored in C,

and so on.


By allocating additional registers, 

Z[1] returns what is stored in the 27th register,

Z[2] returns what is stored in the 28th register,

Z[3] returns what is stored in the 29th register,

and so on. 


Variables are allowed.  For example, if 2 is stored in I,  then:


15 → A[ I ] stores 15 in C (2 steps from A).

  

The tilde command is allows us to store a value in multiple registers.  The tilde acts like a Fill function.


For example:  12 → A ~ D  stores 12 in A, B, C, and D.  


Programming


The programming mode of the fx-4000P has a capacity of 550 steps, which can be allocated into 10 slots, Prog 0-9.   The maximum step capacity is reached when the minimum of memory registers is set, 26.  (Defm 0).  The language is Casio Basic:


:

colon that ends each line (except for ◢)


→   

store 


◢  

stop and display (Disp indiciator lights up)


Goto/Lbl #   

up to 10 lables 0-9


Isz var  

increment var by 1 and skip next command if var = 0


Dsz var

decrement var by 1 and skip next command if var = 0


Use Isz and Dsz to simulate For-Next loops


[test]  ⇒ [do if true, skip if false] : [ next command ]

simple If/Then jump structure (displayed on the keyboard is a solid, bold arrow)


Prompting is a little different, as the string must be followed by a colon, then a question mark is used:

"prompt" : ? → var


Example:   Prompt for the user to enter an angle and store it A.   

"ANGLE" : ? → A


We can display a string for a brief pause, simulating a Wait command by this:

"time" → var : Lbl # : "string" : Dsz var : Goto # 


For example, the string "45" is displayed for 25 counts:

25 → I : Lbl 1 : "45" : Dsz I : Goto 1


Strings can also contain the characters engineering symbols k, m, μ, n, p (but not use these in calculations), a solid square, and the angle symbols °, ^r, and ^g (which also allow the user to override the current angle). Strangely, the symbols Θ and % are not included.  


The use of Prog (key is labeled [Prg]) in programs will allow for the use of subroutines.  For subroutines, an implied Return command is added to the end of the subroutine.  


To save space, use → without closing all the parenthesis.  The Ans (last answer) can also be used in between steps.   In COMP mode, pressing equals closes all pending parenthesis.  


The programming structure of the fx-4000P, along with the fx-7000g and fx-6300g,  provide a base for future Casio programming and later graphing calculators.  


Sample Programs:

(spaces and returns provided for readability)


PO:  Σ( (A*x+B)^C from x = 0 to N )

(65 steps)


"A" : ? → A :

"B" : ? → B :

"C" : ? → C :

"N" : ? → N :

0 → S :

Lbl 1 :

S + (A N + B) x^y C → S

Dsz N : Goto 1 : 

S + B x^y C → S


Examples: 

A = 2, B = 6, C = 2, N = 4;  Result = 540

A = 5, B = -2, C = 3, N = 5;  Result = 20727


P1:  Payment of a Mortgage

(64 steps)

P = loan amount

R = periodic rate

N = number of payments

M = payment 

Cash flow convention is followed.


Fix 2 :

"PV" : ? → P :

"RATE" : ? → R :

"N" : ? → N :

.01 R → S :

"PMT" ◢

-P S ÷ (1 - (1 + S) x^y ( -N → M ◢

Norm


Example:

Monthly payment of a $320,000.00 loan at 4% annual for 30 years.

P = 320000, R = 4 ÷ 12, N = 30 × 12; Result -1527.73  (payment of $1,527.73)


If you want to a series of programs for the fx-4000P and possible what they would look like for the fx-5800P/graphing calculators, please let me know in the comments. 


Closing Thoughts


The Casio fx-4000P is a good, entry level programmable calculator which includes a good amount of programming steps.  


The fx-4000P reminds me of the current Casio fx-3650P(II) and what the latter lacks.   I wish the next incarnation of the fx-3650P had the integer, fractional, absolute value, and the ability to use strings with the full alphabet.   The only advantage the fx-3650P has is the derivative, integral, and fractions. 


The fx-4000P runs decently fast and the screen has a big display of characters and results, and it holds up as a favorite.  


Eddie


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



Python: Drawing a Ring of Circles

Python: Drawing a Ring of Circles The goal: Draw a number of circles that revolve around the origin (0,0). The center of each circle i...