Sharp EL-9300 Programs
Today’s blog entry takes us to the 1992 Sharp’s EL-9300 graphing calculator. On January 10, 2022, I gave a review of this calculator:
https://edspi31415.blogspot.com/2022/01/retro-review-sharp-el-9300c.html
The programs should also work on the EL-9200. Spaces are added for readability.
Sharp EL-9300 Program: polygon2
The program polygon2 calculates four properties of regular polygons:
* The internal angle of the polygon
* The length of the polygon’s apothem
* The length of the polygon’s radius
* The area of the polygon
A regular polygon is a polygon whose sides all have equal length and all the internal angles are equal.
REAL Mode
Print “Set Degrees 1st”
Wait 1
Print “number of sides”
Input n
Print “side length”
Input x
angle = (n – 2) / n * 180
apothem = x / 2 * tan (angle / 2)
radius = x / (2 * cos (angle / 2) )
area = n * x * apothem / 2
ClrT
Print angle
Print apothem
Print radius
Print area
Note that the calculator must be set in Degrees mode prior to running this program. To set the degrees mode, press [ SET UP ], [ B ], [ 1 ]. Note that this won’t set the angle mode indicator in the program as the angle mode change takes place outside of the program script.
Examples
Inputs: n = 6, x = 8
Outputs:
angle = 120 (internal angle)
apothem = 6.92820323
radius = 8
area = 166.2768775
Inputs: n = 12, x = 1.5
Outputs:
area = 150
apothem = 2.799038106
radius = 2.897777479
area = 25.19134295
Sharp EL-9300 Program: agm
The program agm calculates the arithmetic-geometric mean between two numbers x and y.
(x + y) / 2
√(x * y)
The program also asks for the tolerance. If the tolerance is small, it means we are asking for better accuracy at the expense of additional calculations.
REAL Mode
ClrT
Print “arithmetic/”
Print “geometric mean”
Input x
Input y
Print “tol (10^-nn)”
Input tol
Label loop
a = (x + y) / 2
g = √(x * y)
x = a
y = g
If abs(a – g) >= tol Goto loop
ClrT
Print “results”
Print a
Print g
End
Examples
Inputs: x = 15, y = 70, tol = 10^-6
Outputs:
a = 37.28076573
g = 37.28076573
Inputs: x = 1649, y = 1248, tol = 1E-7
Outputs:
a = 1441.519759
g = 1441.519759
The EL-9300 is pretty quick.
Sharp EL-9300: quadratic
The program quadratic solves the quadratic equation:
a * x^2 + b * x + c = 0
where a, b, and c can be real or complex numbers.
COMPLEX Mode
ClrT
Print “ax^2+bx+c=0”
Print “complex numbers”
Input a
Input b
Input c
x = (-b + √(b^2 – 4 * a * c)) / (2 * a)
z = x - √(b^2 – 4 * a * c) / a
ClrT
Print “solutions=”
Print x
Print z
End
Examples
Inputs:
a = 4 + 3i, b = 2 – 5i, c = 3i
Solutions:
x = 0.346818295 – 0.288439118i
z = -0.066818295 + 1.328439118i
Inputs:
a = 2, b = -6i, c = -4 + 8i
Solutions:
x = 1.370730624 + 0.040924113i
z = -1.370730624 + 2.959075887i
Sharp EL-9300 Program: twobytwo
The program twobytwo solves the simultaneous set of equations:
a * x + b * y = e
c * x + d * y = f
where a, b, c, d, e, and f can be complex numbers.
COMPLEX Mode
Print “2x2 system”
Print “complex numbers”
Print “A=((a,b)(c,d))”
Input a
Input b
Input c
Input d
Print “B=((e)(f))”
Input e
Input f
g = a * d – b * c
h = e * d – f * b
i = a * f – c * e
x = h / g
y = i / g
ClrT
Print “solutions=”
Print x
Print y
End
Examples
Input:
a = 3 + 2i, b = -i
c = 3 – 2i, d = 1 – i
e = 0, f = 5i
Outputs:
x = -0.660377358 + 0.188679245i
y = -0.754716981 + 2.358490566i
Input:
a = 3, b = -6
c = 3i, d = 6i
e = 1, f = -i
Outputs:
x = 0
y = -0.166666667
Eddie
All original content copyright, © 2011-2024. 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.