Tuesday, June 22, 2021

Update: HP Prime Connectivity Kit and Emulator

 Update: HP Prime Connectivity Kit and Emulator

The HP Prime Connectivity Kit and Emulator have been updated.  The version number is 14592 (6/9/2021).  Download them from this page:

https://www.hpcalc.org/prime/pc/

The 14588 (5/5/2021) firmware is still the current firmware for the HP Prime, which can be downloaded from the same page.

As a reminder, the newest firmware introduces, among other things, the Python app to the HP Prime.  Click on this link to read about some of the new features:  http://edspi31415.blogspot.com/2021/05/hp-prime-firmware-update-beta-python.html

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. 


Monday, June 21, 2021

Retro Review: Sharp EL-8131

Retro Review:  Sharp EL-8131







Many thanks to Christopher Brame for sending and giving me this calculator.  Thank you, my friend.


Quick Facts:


Company:  Sharp

Year Introduced:  1977, in production to 1978

Type:  Four Function

Batteries:  2 x AA batteries

Display:  8 digits


Background


The Sharp EL-8131 is a four function function from the 1970s with classic green digits in the display.  The calculator is nice and compact and held in one hand, while the other hand operates the well-designed keys.  


The functions of the EL-8131 include:


* Arithmetic

* Memory:  Store ( x→M), clear, recall, M-, M+

* Square Root

* Percent 


What is missing is the change sign key.  This presents a challenge when calculating with negative numbers.   


With any four function calculators, calculations are executed in the order you press the keys.  


Source:


"Sharp EL-8131 Handheld Electronic Calculator"  National American of American History.  Behring Center.  Washington, D.C.  https://americanhistory.si.edu/collections/search/object/nmah_334546  Retrieved May 23, 2021


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. 


Sunday, June 20, 2021

TI-84 Plus CE: Bode Plots of Transfer Functions

 TI-84 Plus CE: Bode Plots of Transfer Functions


Introduction


The problem BODEPLOT (2021) plots the Bode plot of a transfer function in the form:


f(s) = ( (s - z1) (s - z2) (s - z3) * ... ) / ( (s - p1) (s - p2) (s - p3) * ... )


where:

z_i = zeros of the transfer function

p_i = pole of the transfer function

s = jw

j = i = √-1

w = frequency


The plot uses a linlog plotting where each x is replaced with 10^x.  The y axis represents the conversion y = 20 log_10 ( abs f( 10^x * j) ).


Lists used:

L1:  list of zeros

L2:  list of poles

L3:  x

L4:  20 log_10 ( abs f( 10^x * j) )


You can review the zeros and poles after each entry.  Erasing zeros and poles will erase the latest entry. 


TI-84 Plus CE Program:  BODEPLOT

Version 5.3 and above


"EWS 2021-05-02"

ClrHome

Disp "TRANSFER FUNCTION","F(S)=(S-ZERO).../(S-POLE)","S=JW 10^(W),20log(abs())"

Pause 

a+bi

0→A

0→B

0→Z

Lbl 0

toString(A)+" ZEROS, "+toString(B)+" POLES"

Menu(Ans,"ADD ZERO",1,"ADD POLE",2,"ERASE LAST ZERO",3,"ERASE LAST POLE",4,"REVIEW",5,"PLOT",6)

Lbl 1

Input "ZERO? ",S

If A=0

{S}→L1

If A>0

augment(L1,{S})→L1

A+1→A

Goto 0

Lbl 2

Input "POLE? ",S

If B=0

{S}→L2

If B>0

augment(L2,{S})→L2

B+1→B

Goto 0

Lbl 3

If A>1

Then

A-1→A

A→dim(L1)

Else

0→A

DelVar L1

End

Goto 0

Lbl 4

If B>0

Then

B-1→B

B→dim(L2)

Else

0→B

DelVar L2

End

Goto 0

Lbl 5

ClrHome

If A>0

Then

Disp "ZEROS:"

Pause L1

End

If B>0

Then

Disp "POLES:"

Pause L2

End

Goto 0

Lbl 6

For(I,-­6,6)

1→N

If A>0

prod(i*10^(I)-L1)→N

1→D

If B>0

prod(i*10^(I)-L2)→D

If Z=0

Then

{I}→L3

{20log(abs(N/D))}→L4

1→Z

Else

augment(L3,{I})→L3

augment(L4,{20log(abs(N/D))})→L4

End

End

FnOff 

PlotsOff 

-­7→Xmin

7→Xmax

1→Xscl

min(L4)-.5→Ymin

max(L4)+.5→Ymax

10→Yscl

Plot1(xyLine,L3,L4)

PlotsOn 1

DispGraph


You can download the zip file here.


Examples


f(s) = 1/(s-3)

Poles:  { 3 }










f(s) = s-0.5

Zeros: { 0.5 }










f(s) = ((s+2)(s-2))/((s-1)(s-3))

Zeros: { -2, 2 }

Poles: { 1, 3}










f(s) = (s-4)/((s+1)(s-3))

Zeros: { 4 }

Poles: { -1, 3 }










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. 



Saturday, June 19, 2021

7000G Retro Month - June 19 Edition

7000G Retro Month - June 19 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 Probability and Random Numbers.  Enjoy!


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


Random Integers: Repeats Allowed 


This program allows the user to generate a number of integers between A and B, repeats are allowed.   Each integer is displayed one at a time.


"A"? -> A

"B"? -> B

"N"? -> N

Lbl 1

Int ((B-A+1) Rnd#) /I

Dsz N

Goto 1


Combinatorics


The program allows the user to choose between three options:


1.  PERM:  permutation:  nPr

2.  COMB:  combination:  nCr

3.  COMB REPLACE:  combination with replacements allowed (n+r-1)Cr


"N"? -> N

"R"? -> R

"1. PERM"

"2. COMB"

"3. COMB REPLACE"

? -> K

K=1 => N!÷(N-R)! -> X

K=2 => N!÷(R!(N-R)!) -> X

K=3 => (N+R-1)!÷(R!(N-1)!) -> X

X


Binomial Distribution


This program calculates the sum of probabilities for a binomial distribution:


total probability = ∑( nCr(N,K) p^K (1-p)^(N-K), K=A to B)


Probability:  0 < p < 1


"A"? -> A : "B"? -> B

"N"? -> N : "P"? -> P

0 -> M : Lbl 1

M+(N!×P^A×(1-P)^(N-A))÷(A!(N-A)!) -> M

A+1 -> A

A>B => Goto 2

Goto 1

Lbl 2

M


Confidence Interval


This program generates a confidence interval using one of four probabilities are assigned to the following variables:


F: 99%  (z* ≈ 2.576)

G: 98% (z* ≈ 2.326)

H: 95% (z* ≈ 1.96)

I: 90% (z* ≈ 1.645)


interval = mean ± z* × variance / √n


"CONF INTERVAL"

2.576 -> F

2.326 -> G

1.96 -> H

1.645 -> I

"MEAN"? -> A

"VAR"? -> B

"N"? -> N

"F=.99, G=.98"

"H=.95, I=.90"

? -> J

A-JB÷√N -> E /I

A+JB÷√N -> F


E:  low, F: high


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. 


Monday, June 14, 2021

Review: Calculated Industries Pipes Pro (Model 4095)

Review:  Calculated Industries Pipes Pro (Model 4095)








Quick Facts


Model Number:  4095

Company:  Calculated Industries

Year of Production:  2009 - present

Operating System:  Algebraic (AOS) or Chain

Batteries: 2 x LR 44

Memory Register:  1 independent (M), 9 registers M1-M9

Paperless Tape Memory: 30 steps


Bought new or in box, the calculator comes in a red Armadillo Gear case that fits the calculator.   I really am a fan of the Armadillo Gear cases, not only it gives the calculator protection, it makes it look better. 


Product Page:  https://www.calculated.com/mobile/prd267/Pipe-Trades-Pro-4095-Advanced-Pipe-Trades-Calculator.html


Mathematical Functions and Order of Operations


*  Parenthesis

*  Powers and Roots

*  Trigonometry: Sine, Cosine, Tangent, and their inverses.  All angles are in degrees. 


The Pipe Trades Pro (4095) has the same operating system as the Tradesman Calc (4400), the order of operations is followed:


1. Parenthesis 

2. Roots, Powers, Percent, Trigonometric Functions

3. Multiplication and Division

4. Addition and Subtraction


The Pipe Trades Pro can be set to Chain mode or Algebraic (Order) mode in preferences.


Dimensional Math


The most common feature across CI calculators (except for the finance models) is dimensional math.  The dimensions the Pipe Trades Pro include are:


Feet-Inch-Fractions of Inches vs. Meters

Pounds vs Kilograms

Cubic Feet per Minute (cfm), Cubic Feet per Second (cfs), Gallons per minute (gpm), Liters per second (l/s)

Degrees Celsius vs Degrees Fahrenheit


Conversions are made by using the [ Conv ] button.  Dimensional math is made quick and easy, one of the trademarks of the CI calculators.


The [ Circle ] key calculates the area and circumference of a circle given its diameter. 


Right Triangle Solutions


With the right triangle keys, the Pipes Trade Pro allows the user to easily make simple offset calculations. 


Angle:  angle between vertex on the x-axis, in degrees

Run:  length of x

Offset:  length of y

Travel:  hypotenuse


Comparison of CI calculators - Right Triangle Solutions Key


Pipe Trade Calculations


Now I am going to highlight some of the common calculations that are unique to this calculator.  Please see the product page for a complete list of calculations because the Pipe Trades Pro does a lot more.  


Pipe Size Database 


The [ Pipe Mat’l ] and [ Conv ] [ Pipe Size ] (Pipe Mat’l) access the calculator’s database of pipe materials depending on material.   The schedules available depend on the material selected:


1. Steel

2. Stainless Steel (S.Steel)

3. Brass

4. Aluminum (AL.)

5. Cast Iron (CAST)

6. Plastic

7. Copper


The [ Pipe Size ] key gives the outside diameter, inside diameter, wall thickness, weight per foot, filled weight per foot, and internal area in square inches.   (this assumes default selections are made)


Example:  5 inch Stainless Steel pipe, class 40


Press [ Pipe Mat’l ] until S.Steel appears

Press [ Conv ] (Pipe Type) [ Pipe Size ] until 40 TYPE S.Steel appears 

5 [ Inch ] [ Pipe Size ]  (keep on pressing [ Pipe Size ] )

40 SIZE   5 INCH

OD  5.5673 INCH  (outside diameter) 

ID   5.047 INCH   (inside diameter)

THK  0.258 INCH   (thickness)

MATL S.STEEL

PIPE 14.90996 LB PER FEET  (pipe weight per foot)

FILL  23.58304 LB PER FEET  (filled weight per foot)

AREA 20.00583 SQ INCH   (internal area)

(the cycle repeats)


A list of the schedules and materials available are listed on page 53 of the User Manual.  The manual can be downloaded here: https://www.calculated.com/UGFiles/UG4095E-D.pdf


Elbow Calculations


The Pipe Trades Pro offers four types of elbow type problems:


1. BW-L:  Butt Weld - Long

2. BW-S:  Butt Weld - Short

3. FC-L:  Field Cut - Long

4. FC-S:  Field Cut - Short


The below type affects take out calculations.


Example:  We have a butt weld-long elbow type pipe, with size of 16 inches and bend angle of 36°.  


Press [ Conv ] (Elbow Type) and press [ Pipe Mat’l ] until BW-L EL. TYPE appears.

16 [ Pipe Size ] 

36 [ Angle/Slope ] 

Press [ Conv ] [ Angle/Slope ] (T.O./Arc) and then [ Angle/Slope ] repeatedly to get the following results:

TO  7 13/16 INCH (take-out)

IARC 10 1/16 INCH (inside arc length)

CARC 15 1/16 INCH (central arc length)

OARC 20 1 / 8 INCH (outside arc length)


For simple offset calculations, use the [ Angle/Slope ], [ Offset ], [ Run ], and [ Travel ] keys.


Pressure Loss


We can calculate the area, flow rate, and pressure loss.  


n [ (dimensions) ] [ Pipe Size ] enters pipe size

n [ Conv ] [ ( ] (Flow) enters the flow rate 

[ Conv ] [ √x ] (Area) gives the area

[ Conv ] [ Circle ] (Pressure) with repeated press of the [ Circle ] key pressure loss in different units 


Example:

Calculate the area and pressure loss of a steel pipe of 5”, schedule 80.  The flow rate is measured to be 6.2 gallons per minute.  


Press [ Pipe Mat’l ] until the screen shows Steel

80 [ Conv ] [ Pipe Size ] (Pipe Type) to set the Pipe to Schedule 80

5 [ Inch ] [ Pipe Size ]

6 [ Conv ] [ 1 ] (gpm) [ Conv ] [ ( ] (Flow) 

[ Conv ] [ Circle ] (Pressure) and them press [ Circle ] to cycle between units:

PSI PER FEET:  0.000008 

REY 3942.518

PSF PER FEET 0.001081

inHG PER FEET 0.000015

HEAD PER FEET 0.000017

BAR PER FEET 0.000001

KPA PER FEET 0.000052

PSI PER FEET 0.000008


Verdict


The keyboard of the Pipe Trades Pro works well and the keys give good feedback. 


I think the biggest benefits of the Pipe Trades Pro are the dimensional math features and types of data stored in pipe materials, pipe types, schedules, and elbow types.  This, I believe, is where Calculated Industries separates itself from the rest.  


I also like the extensive set of scientific calculator functions that the Pipe Trades Pro.  


I plan to add more Calculated Industries calculators to my collection over the next few months, including the GradeMatic 200, ElectricCalc Pro, and the ConcreteCalc. 



I plan to add more Calculated Industries calculators to my collection over the next few months.  



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. 


Sunday, June 13, 2021

Numworks: Bezier Curve (Using Ion Module)

 Numworks: Bezier Curve (Using Ion Module)


Introduction


The script bezier1 plots a Bezier curve of degree 1, 2, or 3 in one of four colors: black (0), red (1), green (2), and blue (3).  The script uses the ion module, which allows input directly from the keyboard.


The ion module function keydown returns True if a certain key has been pressed, otherwise, False is returned.  Keys are designed by the declaration KEY_(key name).  For example: 


KEY_ZERO:  0 key

KEY_ONE:  1 key

KEY_TWO:  2 key

KEY_THREE: 3 key

KEY_FOUR: 4 key

KEY_FIVE: 5 key

KEY_SIX:  6 key

KEY_SEVEN:  7 key

KEY_EIGHT:  8 key

KEY_NINE:  9 key


Numworks script:   bezier1.py


# Bezier Curve 

# 2021-05-02 EWS


from ion import *

from math import *

from matplotlib.pyplot import *


# functions


# key press

def key():

  while True:

    if keydown(KEY_ONE):

      return 1

    if keydown(KEY_TWO):

      return 2

    if keydown(KEY_THREE):

      return 3


# linear plot

def linbez(x0,y0,x1,y1):

  xlist=[x0]

  ylist=[y0]

  t=0

  while t<1:

    t+=0.05

    xlist.append(x0*(1-t)+x1*t)

    ylist.append(y0*(1-t)+y1*t)

  return [xlist,ylist]


# quadratic plot

def quadbez(x0,y0,x1,y1,x2,y2):

  xlist=[x0]

  ylist=[y0]

  t=0

  while t<1:

    t+=0.05

    x=x0*(1-t)**2+2*x1*t*(1-t)+x2*t**2

    y=y0*(1-t)**2+2*y1*t*(1-t)+y2*t**2

    xlist.append(x)

    ylist.append(y)

  return [xlist,ylist]


# cubic plot

def cubbez(x0,y0,x1,y1,x2,y2,x3,y3):

  xlist=[x0]

  ylist=[y0]

  t=0

  while t<1:

    t+=0.05

    x=x0*(1-t)**3+3*x1*t*(1-t)**2+3*x2*t**2*(1-t)+x3*t**3

    y=y0*(1-t)**3+3*y1*t*(1-t)**2+3*y2*t**2*(1-t)+y3*t**3

    xlist.append(x)

    ylist.append(y)

  return [xlist,ylist]  


# color selection

def colsel():

  print("Choose a color:")

  print("0: black, 1: red \n2: green, 3: blue")

  while True:

    if keydown(KEY_ZERO):

      return 'black'

    if keydown(KEY_ONE):

      return 'red'

    if keydown(KEY_TWO):

      return 'green'

    if keydown(KEY_THREE):

      return 'blue'

      

# main program

print("Bezier Curve Plot")

print("Order? Press 1, 2, or 3.")

n=key()

x0=float(input("x0? "))

y0=float(input("y0? "))

x1=float(input("x1? "))

y1=float(input("y1? "))

if n==1:

  clist=linbez(x0,y0,x1,y1)

if n>1:

  x2=float(input("x2? "))

  y2=float(input("y2? "))

if n==2:

  clist=quadbez(x0,y0,x1,y1,x2,y2)

if n==3:

  x3=float(input("x3? "))

  y3=float(input("y3? "))

  clist=cubbez(x0,y0,x1,y1,x2,y2,x3,y3)

# color section

ch=colsel()

# plotting

xlist=clist[0]

ylist=clist[1]

xa=min(xlist)-1.5

xb=max(xlist)+1.5

ya=min(ylist)-1.5

yb=max(ylist)+1.5

# set axis and turn it on

axis((xa,xb,ya,yb))

axis("on")

# plot the curve

plot(xlist,ylist,color=ch)

show()


Program Size: 1995 bytes 


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. 

Saturday, June 12, 2021

7000G Retro Month - June 12 Edition

7000G Retro Month - June 12 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 Graphics.  Enjoy!


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


Get a emulator or graphing calculator to see the results.


Quadratic Fit by Two Roots


Given two roots A and B, the program generates a quadratic equation and it's graph.   The program assumes that the vertex is a minimum.


Y = (X - A) (X - B)


"ROOT1" -> A

"ROOT2" -> B

"Y = X^2 - " /I

A+B /I

"X + " /I

AB /I

Cls

Graph Y=(X-A)(X-B)


Polar Plotting (Self Contained)


I usually use Radians (Mode 5 for fx-7000G, fx-7500G, fx-6300G) angle mode when it comes to graphics and calculus.  To set/change each equation, you will need to edit the program here.  I state the equation to be in the form r(T) where T = θ.  


On the Rec command, x is stored to I and y is stored to J.  (specific to fx-7000G, fx-7500G, fx-6300G)


"POLAR R(T)"

Rad

"RMIN"? -> A

"RMAX"? -> B

"N"? -> N

(B-A)÷N -> H

A-H -> T

Cls

Lbl 1

T+H -> T

[insert r(T) here]

Rec(Ans, T)

Plot I,J

T<B => Goto 1


Cubic Bezier Curve


This program plots a cubic Bezier curve with the following variables:


(x0, y0):  A = A[0], B = A[1]  (exact fit)

(x1, y1):  C = A[2], D = A[3]

(x2, y2):  E = A[4], F = A[5]

(x3, y3):  G = A[6], H = A[7]   (exact fit)


Cls

0 -> I

"CUBIC BEZIER"

Lbl 1

"X"? -> A[ I ]

Isz I

"Y"? -> A[ I ]

Isz I

I < 8 => Goto 1

0 -> T

Lbl 2

A(1-T)^3 + 3C(1-T)^2 T + 3E(1-T) T^2 + GT^3 -> X

B(1-T)^3 + 3D(1-T)^2 T + 3F(1-T) T^2 + HT^3 -> Y

Plot X,Y

T+.02 -> T

T<1 => Goto 2


Press [ G<>T ] to see the graph.  


Polygon Drawing


The programs allow the user to draw many lines in a row by connecting points.   The original point are stored in variables E and F.   To complete the polygon, use (E, F) as the final point.  


The prompt MORE:  enter 0 to stop, anything else to continue connecting points


Cls

"X0"? -> A : A -> E

"Y0"? -> B : B -> F

Plot A,B

Lbl 1

"ORIG (E,F)"

"NEXT X"? -> C

"NEXT Y"? -> D

0 -> T

Lbl 2

(1-T)A+CT -> X

(1-T)B+DT -> Y

Plot X,Y

T+.02->T

T<1 => Goto 2

C -> A : D -> B

"MORE"? -> M

M≠0 => Goto 1


Drawing an Ellipse


This program draws an ellipse.  


"ELLIPSE"

"X RADIUS"? -> A

"Y RADIUS"? -> B

Rad

Cls

Range -A-.5,A+.5,(2A+1)÷20,-B-.5,B+.5,(2B+1)÷20

0 -> T

Lbl 1

Plot A cos T, B sin T

T+2π÷64 -> T

T<2π => Goto 1


Press [ G<>T ] to see the graph.  


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. 


Sunday, June 6, 2021

Retro Review: Radio Shack EC-4027

Retro Review:  Radio Shack EC-4027




Quick Facts:

Company:  Radio Shack
Year Introduced:  1993
Type:  Scientific, Formula Programming
Memory:  40 steps
Operating System:  Algebraic
Memory Registers:  7, A through F, M
Batteries:  2 x LR44 (357)
Equivalent Of:  Sharp EL-5020

Background

From the 1970s to about the 1990s (maybe early 2000s), Radio Shack sold OEM equivalents of calculators from Sharp, Casio, and Texas Instruments, and the EC-4027 is no exception.  One advantage to buying Radio Shack is that the price tends to be cheaper but with equivalent quality of the original.

An Update to the Sharp EL-5100

The EC-4027 (and the Sharp EL-5020) is a scientific calculator which holds multi-step formulas.   There are no switches, everything is keys this time.  The following modes offered are:

*  Normal:  Computational mode
*  AER:  Program and store formulas
* ∫dx:  Integral Mode
* STAT 1:  Single-variable statistics mode
* STAT 2:  Linear Regression, y = a+bx

Base conversions and fractions are added.  

Like the EL-5100, expressions are entered algebraically as you would write it down.   A frustrating part is that the entire expression is not shown on the screen, regulating functions to the sides of the screen, which makes editing expressions difficult if not impossible.

Integration and Loops but With Less Memory

The memory of the EC-4027 is half of the EL-5100:

* 40 steps instead of 80
* Only two formulas can be stored instead of five

We do get comparisons against the M register, all six comparisons (<, ≤, =, >, ≥, ≠).  If the condition is met, the formula is starts over from the beginning, creating a loop.   

There is a separate mode for integration.  Either formula 1 or 2 can be called, and Simpson's Rule is used.  Any function that can be integrated is in terms of M.  

I wish the memory wasn't halved but instead increased.  Also, expand the ALPHA characters to include the entire alphabet.  But, the EC-4027 serves it's purpose.

Sources:

Toth, Viktor T. "Radio Shack EC-4027"  2000-2018.  https://www.rskey.org/ec4027  Last accessed April 9, 2021

Voidware.  "Sharp EL-5020" http://www.voidware.com/calcs/el5020.htm  Last accessed April 9, 2021. 

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. 

Saturday, June 5, 2021

7000G Retro Month - June 5 Edition

7000G Retro Month - June 5 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 General Mathematics.  Enjoy!


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



Day Number of the Year


Returns the day number of a year, with January 1 being Day 1 and December 31 being day 365 (or 366 on leap years).  For LEAP? enter 0 for non leap years or 1 for leap years.   


"MONTH"? -> M

"DAY"? -> D

"LEAP"? -> L

M≤2 => D+Int(30.6M+368.8)-399 -> N

M>2 => D+Int(30.6M+1.6)-34+L -> N


Arithmetic-Geometric Mean


The arithmetic-geometric mean of two positive numbers x and y is a convergence of repeated means:


Arithmetic:  a = (x + y)/2

Geometric:  g = √(x y) 


Tolerance:  decimal to determine desired accuracy.  For example, to eight decimal places, set tolerance to 1E-8.  


"AGM"

"A0"? -> X

"G0"? -> Y

"TOL"? -> T

Lbl 1

(X+Y)÷2 -> A

√(XY) -> G

A -> X : G -> Y

Abs (A-G) ≥ T => Goto 1

A /I

G


The final A and G are displayed to show the convergence.  


Now for two classics.


Determinant of a 3 x 3 Matrix


Here the program makes use of the square brackets and indirect storage.  Yes, indirect storage and recall are possible with the fx-7000G and fx-7500G.  Of course, this program is not necessary in later graphing calculators.


A[0] = A

A[1] = B

A[2] = C

A[3] = D

A[4] = E

A[5] = F

A[6] = G

A[7] = H

A[8] = I


Elements are entered left to right, completing row by row.


The determinant is stored in the variable T.


The Isz command is used to increment K by 1.  Since K starts at 0 and K increases by 1 before comparing it, the next command is never going to be skipped.


"3 X 3 DET"

0 -> K

Lbl 1

? -> A[K]

Isz K

K < 9 => Goto 1

A(EI-FH)-B(DI-FG)+C(DH-EG) -> T


Quadratic Formula


I would consider this the "Hello World" of mathematics programs.   


Ax^2 + Bx + C = 0


Let D be the discriminant:  D = B^2 - 4AC.   D is displayed where you can determine the characteristics of the roots:


D ≥ 0:  roots are real, stored in X and Y

D < 0:  roots are complex, that take the form of X + Yi, X - Yi


"A"? -> A

"B"? -> B

"C"? -> C

B^2-4AC -> D /I

D<0 => Goto 1

(-B+√D)÷(2A) -> X

(-B-√D)÷(2A) -> Y

Goto 2

Lbl 1

-B÷(2A) -> X

√ Abs D ÷(2A) -> Y

Lbl 2

X /I Y


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. 


Update: HP Prime Connectivity Kit and Emulator

  Update: HP Prime Connectivity Kit and Emulator The HP Prime Connectivity Kit and Emulator have been updated.  The version number is 14592 ...