Monday, January 5, 2026

Casio fx-CG 100 Python: Clothoid Curve Analysis

Casio fx-CG 100 Python: Clothoid Curve Analysis



Introduction



The clothoid is a mathematical curve where its curvature is in proportion to the distance traveled from the origin. This property allows the curve to serve many applications including connecting railways, designing roller coasters, and traffic distribution.







Let:

L: arc length of the curve traveled

R: radius from the center of the clothoid to the point on the curve

(x, y): point on the clothoid curve with curve length L and radius R

A: parameter, where A = √(R * L)

Θ: angle between the radius and line of the center point and a point on the x-axis, where Θ = L^2 ÷ (2 * A^2)



The point on the curve is determined by a variation of the Fresnel Integrals:

x = A * √2 * ∫( cos(u^2) du, u = 0 to u = t)

y = A * √2 * ∫( sin(u^2) du, u = 0 to u = t)



The Python program uses infinite series to calculate the point (x, y).



The Clothoid curve is also known as the Cornu spiral or the Euler spiral.


Casio fx-CG 100 Program: clothoid.py


# Clothoid Curve Analysis

# template of infinite series

# Eddie W. Shore, 11/23/2025


from math import *


# factorial function

def fact(n):

  f=1

  if n<=1:

    return 1

  else:

    for i in range(2,n+1):

      f*=i

    return f


# main program

print("Clothiod Analysis\nCornu Spiral")

r=eval(input("radius: "))

l=eval(input("arc length: "))

a=sqrt(r*l)

t=l**2/(2*a**2)


# c: cosine, s=sine

c=0

s=0

# set term artificially high

w=100

# set counter at beginning

n=0

# series loop

while abs(w)>=1e-20:

  cc=(-1)**n*t**(4*n+1)/(fact(2*n)*(4*n+1))

  ss=(-1)**n*t**(4*n+3)/(fact(2*n+1)*(4*n+3))

  w=max(cc,ss)

  c+=cc

  s+=ss

  n+=1

# answer

x=a*sqrt(2)*c

y=a*sqrt(2)*s

print("constant: {0:.12f}".format(a))

print("angle: {0:.12f}".format(t))

print("x: {0:.12f}".format(x))

print("y: {0:.12f}".format(y))


Example


Input:

Radius: r = 1.75

Arc Length: l = 4.00


Results:

constant (a): 2.645751311065

angle (degrees): 1.142857142857°

x: 3.602081584381

y: 1.646831998544



Sources


Autodesk, Inc. “About Spiral Definitions” Autodesk Civil 3D Help. https://help.autodesk.com/view/CIV3D/2025/ENU/?guid=GUID-DD7C0EA1-8465-45BA-9A39-FC05106FD822. 2025. Retrieved November 19, 2025.


Constantin. “The Clothoid” A railway track blog. https://railwaytrackblog.com/2016/07/03/the-clothoid/comment-page-1/ March 7, 2016. Retrieved November 19, 2025.


Gombáu, Alberto. “The clothoid: geometry that unites mathematics, engineer and design”. https://medium.com/@gombau/the-clothoid-geometry-that-unites-mathematics-engineering-and-design-6323de37e979. April 11, 2025. Retrieved November 19, 2025.



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.

Sunday, January 4, 2026

Casio fx-CG 100 Python: Infinite Series and Fresnel Integrals

Casio fx-CG 100 Python: Infinite Series and Fresnel Integrals



Introduction



Many functions, such as the Fresnel Integrals, the Zeta function, and the error function, can be calculated using infinite polynomials by the sum:



f(x) = Σ( g(x, n) from n = 0 to n = ∞) or

f(x) = Σ( g(x, n) from n = 1 to n = ∞)



where:

f(x): the function to be calculated

g(x, n): the infinite series representative of (x)



g(x, n) often includes the factorial function n!, where n starts at either 0 or 1 to infinity. While I was programming on fx-CG 100, I did not find a factorial function in the math module that is included in the MicroPython. So I included a definition of the factorial function as:



# factorial function

def fact(n):

  f=1

  if n<=1:

    return 1

  else:

    for i in range(2,n+1):

      f*=i

  return f



While this function does not check for negative integers, it gives the default values 0! = 1! = 1.


The main program sets up a sum, ask for initial values, and set up a check variable w = g(x,n), with a high initial value to “fail” the loop test. The loop template is set up as:


w=initial value

n=0 (start value of n)

while abs(w)>=1e-20: (1e-20 is a tolerance value, which can be adjusted)

  w=g(x,n)

  s+=w

  n+=1



An Example: Cosine of x Squared



Radians mode is used and is the default angle mode in Python.



cos(x²) = 1 – x^4 ÷ 2 + x^8 ÷ 24 – x^12 ÷ 720 + x^16 ÷ 40320 - …

= Σ( x^(4*n) * (-1)^n ÷ (2n)!, n = 0 to n = ∞)



In this case, g(x,n) = x^(4*n) * (-1)^n ÷ (2 * n)!

I set accuracy tolerance of 1 * 10^-20 but formatted the answer to 12 decimal places.


Casio fx-CG 100 Micropython: cossq.py



# cosine of x squared by series

# template of infinite series

# math module so pi is allowed



from math import *



# factorial function

def fact(n):

  f=1

  if n<=1:

    return 1

  else:

    for i in range(2,n+1):

      f*=i

    return f



# main program

# setup sum

s=0

# ask for x

print("cos(x**2) by series")

x=eval(input("x radians: "))

# series

# set term artificially high

w=100

# set counter at beginning

n=0

# series loop

while abs(w)>=1e-20:

  w=x**(4*n)*(-1)**(n)/fact(2*n)

  s+=w

  n+=1

# answer

print("{0:.12f}".format(s))



Examples:

Example 1: Input: x = 0.5, Result: 0.968912421711

Example 2: Input: x = 1.7, Result: -0.968517164228



Fresnel Integrals



There are two Fresnel integrals.



Cosine Fresnel Integral:

C(x) = ∫( cos( t^2) dt, t = 0 to t = x)

This integral is represented by the infinite series:

C(x) = Σ( x^(4*n + 1) * (-1)^n ÷ ((2* n)! * (4 * n + 1)), n = 0 to n = ∞)



Sine Fresnel Integral:

S(x) = ∫( sin( t^2) dt, t = 0 to t = x)

This integral is represented by the infinite series:

S(x) = Σ( x^(4*n + 3) * (-1)^n ÷ ((2* n + 1)! * (4 * n + 3)), n = 0 to n = ∞)



Casio fx-CG 100 Micropython: fresnel.py



# Fresnel Integrals

# template of infinite series

# Eddie W. Shore, 11/23/2025



from math import *



# factorial function

def fact(n):

  f=1

  if n<=1:

    return 1

  else:

    for i in range(2,n+1):

      f*=i

    return f



# main program

# c: cosine, s=sine

c=0

s=0

# ask for x

x=eval(input("x radians: "))

# series

# set term artificially high

w=100

# set counter at beginning

n=0

# series loop

while abs(w)>=1e-20:

  a=(-1)**n*x**(4*n+1)/(fact(2*n)*(4*n+1))

  b=(-1)**n*x**(4*n+3)/(fact(2*n+1)*(4*n+3))

  w=max(a,b)

  c+=a

  s+=b

  n+=1

# answer

print("x:{0:.12f}".format(x))

print("Fresnel Cosine:\n{0:.12f}".format(c))

print("Fresnel Sine:\n{0:.12f}".format(s))


Examples:

Example 1: x = 0.4,

C(0.4) ≈ 0.398977212913, S(0.4) ≈ 0.021294355570

Example 2: x = 3.1,

C(3.1) ≈ 0.605132097879, S(3.1) ≈ 0.785491219284

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, January 3, 2026

Comparison of Formula Evaluators: TI-60X, TI-68, Sharp EL-5150, fx-4200P, fx-5000f

Comparison of Formula Evaluators


Happy New Year! Let’s start the new year by comparing formula evaluator calculators. The calculators featured are:


TI-60X (early 1990s)


TI-68 (late 1980s/1990s)


Sharp EL-5150 (late 1970s/early 1980s)


fx-4200P (late 1980s/early 1990s)



fx-5000f (late 1980s/early 1990s)


Formula evaluator: A calculator which strictly evaluates simple formulas. There are no loops, no solvers, no sums. The formula evaluates to one answer but can have more than one inputs.


Example:

Allowed: f(x) = x² + 3 – 1 / x

Allowed: f(a,b) = (a * b) / (a + b)

Not Allowed: f(x) = Σ(x² / 3, x = 0, 10)

Not Allowed: f(x) = [1 if x ≥ 0, else 0]



TI-60X

TI-68

Sharp EL-5150

fx-4200P

fx-5000F

Battery

1 x CR2032

1 X CR2032

3 x SR44/LR44

1 x CR2032

2 x CR2032

Memory (bytes)

12 registers (84 bytes)

55 registers (440 bytes)

80 steps

279 steps

675 steps

Variables: Number and Type

12, Single letter: A through I, X, Y, Z

Up to three character variables (3 character variables take up 2 registers)

11: A – J, M

26 single letters for formulas only: A – Z; 6 separate numerical constants (K1-K6)

Letters and Greek characters for formulas only; separate numerical constants (K0-K9)

Does store values to variables take space?

Yes, each variable takes up a register

Yes, 1 register for 1 or 2 character variables, 2 for 3 character variables

No

No

No

How Formulas are accessed

[ 2nd ] [ EE ] (FMLA)

[ 2nd ] [ EE ] (FMLA)

AER Mode; up to 5 lines

[ IN ]/[ OUT ]

[ MODE ] 2: WRT

Prog 0-9,A,B: 12 slots

Integration?

∫ f(x) dx

Yes

Yes

No

No

No

Base conversions?

Yes, with Boolean logic

Yes, with Boolean logic

No

Yes, 32 bit binary block

No

Complex numbers?

No

Yes, with trig and log complex calculations

No

No

No

Engineering symbols?

No

No

Display toggle switch

Display toggle switch

Display toggle switch

Conversions?

Yes. 4 pairs (in/cm, gal/L, lb/kg, °F/°C)

Yes. 4 pairs (in/cm, gal/L, lb/kg, °F/°C)

No

No

No

Scientific Constants?

No

No

No

No

Yes ([ALPHA] [ ln ] (CONST)), 13


Other


Special 13 digit precision mode

Landscape form


128 built in formulas



The four pairs of conversions included in the TI-60X and TI-68 are:

in/cm: inches/centimeters

gal/L: gallons/liters

lb/kg: pounds/kilograms

°F/°C: degrees Fahrenheit/degrees Celsius


The scientific constants included on the fx-5000F are:

c: Speed of Light

h: Planck’s Constant

G: Universal Gravitational Constant

e: Elementary Charge

me: Electron Mass

u: Atomic Mass Unit

k: Boltzmann Constant

Vm: Molar Volume of Ideal Gas at Standard, Temperature, and Pressure

g: Earth’s Gravity Constant

R: Molar Gas Constant

ε0: Permittivity of Vacuum

µ0: Permeability of Vacuum


All the constants are in SI units.


Out of the calculators listed, my favorites are the TI-68 and fx-5000F.



Eddie


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


The author does not use AI engines and never will.


Saturday, December 27, 2025

Casio fx-991CW: Second Derivative

Casio fx-991CW: Second Derivative


Calculating Higher Order Derivatives


A general formula to estimate derivatives of order n, where n is a positive integer (see Sources, Wikipedia):


d^n/dx^n = lim h→0 (1÷h^n * Σ((-1)^(k+n) * comb(n,k) * f(x+k*h), k=0, n)


The first, second, and third derivatives are derived from the above formula like so:


n = 1:

d/dx

= lim h→0 (1÷h * Σ((-1)^(k+1) * comb(1,k) * f(x+k*h), k=0 to 1)

= lim h→0 (1÷h * ((-1)^(0+1)*f(x) + (-1)^(1+1)*f(x+h))

= lim h→0 (1÷h * (-f(x) + f(x+h))

= lim h→0 (f(x+h) - f(x)) ÷ h


This is the famous forward difference formula.


n = 2:

d^2/dx^2

= lim h→0 (1÷h^2 * Σ((-1)^(k+2) * comb(2,k) * f(x+k*h), k=0 to 2)

= lim h→0 (1÷h^2 * ((-1)^2*comb(2,0)*f(x) + (-1)^3*comb(2,1)* f(x+h) + (-1)^4*comb(2,2)*f(x+2*h))

= lim h→0 (f(x) - 2*f(x+h) + f(x+2*h)) ÷ h^2


n = 3:

d^3/x^3

= lim h→0 (1÷h^3 * Σ((-1)^(k+3 * comb(3k) * f(x+k*h), k=0 to 3)

= lim h→0 (1÷h^3 * ((-1)^3*comb(3,0)*f(x) + (-1)^4*comb(3,1)*f(x+h) + (-1)^5*comb(3,2)*f(x+2*h)

+ (-1)^6*comb(3,3)*f(x+3*h))

= lim h→0 (-f(x) + 3*f(x+h) - 3*f(x+2*h) + f(x+3*h)) ÷ h^3



Using the fx-991CW


- - - - - - - - - -

Start with a note: Commentary and limitations: The functions f(x) and g(x), along with the calculus functions sum (Σ), integral (∫), and derivative (d/dx), has x as variable. It makes it a challenge that x is the only variable the functions f and g can take.


Example:


f(x)=x^2

g(x)=Σ(f(x),x=0 to 5)


Executing g(x) will take the values x=0 through x=5 no matter what value we put for g. The answer, in this example, will always return 0^2 + 1^2 + 2^2 + 3^2 + 4^2 + 5^2 = 55.

- - - - - - - - - -


We can still use f and g to set up specific derivatives in order n. For the second dervative, set up f and g:


f(x) = <function in terms of x>

g(x) = (f(x+2×A)-2×f(x+A)+f(x))÷A²


Store h in A. We can also choose an h and write in the formula directly.


Remember, this will calculate an approximation. With the most appropriate settings for h, we can get the best approximation.


Examples


For all the examples, A is set as 10^-7. The calculator is set to Radians. g(x) is the second derivative approximation.


Example 1:


f(x) = sin(x), f''(x) = -sin(x)

g(x) = (f(x+2×A)-2×f(x+A)+f(x))÷A²


x = 0.6; g(x): -0.564642551 (actual: -0.5646424734)

x = 2.8; g(x): -0.334988057 (actual: -0.3349881502)


Example 2:


f(x) = 2×e^(0.3×x), f''(x) = 0.18×e^(0.3×x)

g(x) = (f(x+2×A)-2×f(x+A)+f(x))÷A²


x = 0; g(x): 9/50 = 0.18 (actual: 0.18)

x = 1.2; g(x): 0.25799928 (actual: 0.2579992946)


Example 3:


f(x) = 1.1×x^3, f''(x) = 6.6×x

g(x) = (f(x+2×A)-2×f(x+A)+f(x))÷A²


x = 0; g(x): 6.6×10^-7 (actual: 0)

x = 2.2; g(x): 14.52 (actual: 14.52)



Sources



McCarty, George. Calculator Calculus. EduCALC Publications. E. & F.N. Spon: London. 1975, ISBN 0- 419-12910-3



Wikipedia "Numeric differentiation" Wikimedia Foundation, Inc. Last Edited June 17, 2025. Last Accessed July 7, 2025. https://en.wikipedia.org/wiki/Numerical_differentiation


Eddie


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


The author does not use AI engines and never will.



Sunday, December 21, 2025

Spotlight: Calculated Industries Gradematic 100

Spotlight: Calculated Industries Gradematic 100







Quick Facts



Model: Gradematic 100

Company: Calculated Industries

Timeline: 1983

Type: Grades conversion, Four Function

Power: 2 LR44/AR76 batteries

Number of Functions: 576 (see source)



Calculated Industries has three sequels to the Gradematic 100: Gradematic 200, Gradematic 3000, and Gradematic 4000.



Get that Grade!



The Gradematic 100 has four main modes:



* Four Function Calculator

* Timer

* Numerical Grades

* Letter Grades



Four Function Calculator (Calculate Mode)



The four function calculator is the basic calculator with the four arithmetic functions (+, -, ×, and ÷), the percent function (%), and one memory register. The [ MRC ] key acts as both a memory recall and clear. However, there is no square root or change sign key.



From any other mode, we can enter the Calculate mode by pressing the equals key [ = ].



Timer Mode



The timer has the ability to count down from a set time or count up (stopwatch).



Count Down: [ TIMER ], enter minute and seconds, then press [ TIMER ] again. The Gradematic 100 does not beep when the timer runs out.



Count Up: With the display at 0 minutes and 0 seconds, press [ TIMER ] starts the stopwatch. Press [ TIMER ] again to stop the time. The stopwatch can only be stopped once.



Numerical Grades Mode



In the Numerical Grades mode, we can enter numerical grades for students depending on the total number of assignments and tests. The general process is this:



1. Press the [ NUMERICAL GRADES ] key.

2. Enter the maximum total score, which would get the student an A+ grade, then press [ STORE*HI ].

3. Enter the minimum total score of which a student to earn a D- grade, then press [ STORE*LO ].

4. To see the break down, press the [ BREAK POINT ] key repeatedly. When ready, press the [ CONTINUE ] key.

5. For each student, enter each grade, then press the plus button [ + ]. When finished, press the [ STUDENT AVERAGE ] key get the average and the grade.

6. (Optional) Repeat step 5 to enter additional students. Press the [ MRC ] key to get the Class Average.



Example: In a class of six assignments worth 100 points each (for a total of 600 points), find a students’ average on the grades: 88, 78, 85, 92, 93, 90. The minimum grade for a D- is 60% of the maximum (360 points).



[ NUMERICAL GRADES ]

Display: E Hi Sc. 600 [ STORE*HI ]

Display: E Lo Sc. 360 [ STORE*LO]

Display: b.P. Press [ BREAK POINT ]:

360 d-

380 d

400 d+

420 C-

440 C

460 C+

480 b-

500 b

520 b+

540 A-

560 A

580 A+ (press [ BREAK POINT ] to repeat the cycle)

[ CONTINUE ] Display: Su Sd Gr

88 [ + ] 78 [ + ] 85 [ + ] 92 [ + ] 93 [ + ] 90 [ + ] Display: 6 526 (total points: 526)

[ STUDENT AVERAGE ] 6 3.26 b+



Note: For some reason, the grade below D is labeled E.



Letter Grades Mode



The Letter Grades mode operates in a similar way to the Numerical Grades Mode. The Letter Grades Mode has specialty keys [ A+ ] through [ E ]. The student average and class averages works the same way.



Example: Find a students average consisting of the grades A-, B, C+, B+, A-, A.



[ LETTER GRADES ]

Display: Ent Gr. [ A- ] [ B ] [ C+ ] [ B+ ] [ A- ] [ A ] [ STUDENT AVERAGE ]

Display: 6 3.33 b+ (average 3.33 B+)



Two Scales



The GradeMatic 100 has two GPA scales: one where A is worth 4 GPA points, and A is worth 12 GPA points. This scales can be toggled with [ A=12 ] key, which can be pressed at any time.



Final Thoughts



If you get a Gradematic 100, make sure that a manual is included. I purchased one from a local thrift mart for a $1.00 but there was no instructions. That led me to purchase another Gradematic 100 on eBay.



Another fine specialized calculator that was once made by Calculated Industries.



Eddie


All original content copyright, © 2011-2025. 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-CG 100 Python: Clothoid Curve Analysis

Casio fx-CG 100 Python: Clothoid Curve Analysis Introduction The clothoid is a mathematical curve where its curvature is in pro...