Sunday, September 26, 2021

TI-Eighties Graphing Calculators: A Timeline

 TI-Eighties Graphing Calculators:  A Timeline

(dates are from Wikipedia) - United States

TI-81:  1990

TI-85: 1992


TI-82:  1993


TI-80:  1995 - (not pictured)

TI-83:  1996 - (not pictured)

TI-86:  1996


TI-89 (Original): 1998 - (not pictured)

TI-83 Plus: 1999


TI-83 Plus Silver Edition: 2001



TI-84 Plus: 2004




TI-89 Titanium:  2004


TI-84 Plus Silver Edition: 2004 (not pictured)

TI-84 Plus Silver Edition C:  2013 (not pictured)

TI-84 Plus CE:  2015




TI-84 Plus CE Python Edition:  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, September 25, 2021

Sharp EL-5500III & PC-1403: Spin a Wheel and Random Samples

 Sharp EL-5500III & PC-1403:  Spin a Wheel and Random Samples


Spin a Wheel

With the use of the WAIT command, a FOR loop, and an array of strings, we can simulate the spin of a wheel of a random number of steps.  

Note, any variable can be designated a string by adding a dollar sign to the letter, for example A stores a real number, while A$ is a string. 

In an array, A(n-1) has n elements, designated A(0) to A(n-1).  Example:  A(3) has three elements, A(0), A(1), and A(2).

The program presented has a 12 space wheel.  

Sharp EL-5500III/PC-1403 Program:  Spin a Wheel
RUN 900 (or whatever line you designate)

900 DIM A$(11): REM SPIN THE WHEEL
903 N=15 + RND(30)
906 I=RND(12)-1: REM POINTER
909 REM RND(N) GETS 1 TO N
910 A$(0)="$  500"
911 A$(1)="$  650"
912 A$(2)="$  600"
913 A$(3)="$  800"
914 A$(4)="$  750"
915 A$(5)="LOST TURN"
916 A$(6)="$  900"
917 A$(7)="BONUS PRIZE"
918 A$(8)="$  550"
919 A$(9)="$  700"
920 A$(10)="$1,000"
921 A$(11)="  BROKE"
930 WAIT 30: PRINT "SPIN!"
933 FOR J=1 TO N
936 WAIT 20: PRINT A$(I)
939 I=I+1
942 IF I>11 THEN LET I=0
945 NEXT J
946 REM WAIT W/O TIME RESETS PRINT
948 WAIT: PRINT "YOUR SPIN: ";A$(I)
951 END

RUN 900 in RUN mode will show you a wheel spinning.  One of the best results:  "YOUR SPIN: $1,000".   Good luck and have fun!

Random Sample

This program generates an array from a random sample of integers from 1 to N without replacement.  

To save room, a single array is created and an iterative search is made to check to leave out duplicates.   This will increase the time needed to generate longer lists.

Sharp EL-5500III/PC-1403 Program: Random Sample
RUN 1000 (or whatever line you designate)

1000 PRINT "RANDOM SAMPLE"
1003 INPUT "1 TO N. N? "; N 
1006 INPUT "SIZE? "; S
1009 DIM L(S-1)
1012 FOR I=0 TO S-1
1015 R=RND(N)
1018 REM CHECK
1021 FOR J=0 TO I
1024 IF L(J)=R THEN 1015
1027 NEXT J
1030 L(I)=R
1033 PRINT "L("; I; "): "; R
1036 NEXT I
1039 PRINT "RESULT IN ARRAY L"
1042 END

Example:
Choose 10 numbers from 1 to 45.  

1 TO N.  N?:  45
SIZE? 10

A result (your results will vary):
L(0): 9
L(1): 5
L(2): 8
L(3): 4
L(4): 41
L(5): 26
L(6): 42
L(7): 11
L(8): 10
L(9): 28
RESULTS IN ARRAY L

Swiss Micros DM41X Month:  October 2021

Every Saturday in October 2021 will feature the wonderful Swiss Micros DM41X (which programs will apply to the DM41X, DM41L, and the classic HP 41C family).   See you on the next series! 


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, September 20, 2021

Calculator Python: Lambda Functions

Calculator Python: Lambda Functions


Introduction to Lambda Functions


Lambda functions are a quick, one expression, one line, python function.   Lambda functions do not require to be named though they can be named for future use if desired.  


The syntax for lambda functions are:


One argument:


lambda  argument : expression


Two or more arguments:


lambda  arg1, arg2, arg3, ...  : expression


The expression must return one result.  


The quick, versatile of lambda functions are make lambda functions one of the most popular programming tools.


Filter, Map, and Reduce


Filter:  uses a lambda function to filter out elements of a list and array using criteria.   For a list, the list command must be used to turn the result into an actual list. 

 

Syntax using Lambda and List:  


list(filter(lambda  arguments : expression))


Map:  uses a lambda function to apply a function to each element of a list.  Like filter, the list command must be used to turn the result into an actual list.


Syntax using Lambda and Map:


list(map(lambda arguments : expression))


Reduce:  uses a lambda function to use two or more arguments in a recursive function.


Syntax using Lambda:


reduce((lambda arguments : expressions), list)


Note, as of August 31, 2021, that the reduce command is NOT available on any calculator, only on full version of Python 3.  This may change with future updates.  


The following calculators have these commands in their Python programming (as of 8/30/2021):


HP Prime:  lambda, filter, map


Casio fx-CG 50 and fx-9750GIII: lambda, map


Numworks: lambda, filter, map


TI-84 Plus CE Python:  lambda, filter, map


TI-Nspire CX II Python:  lambda, filter, map


Nuwmorks Sample Python File: introlambda.py


from math import *

from random import *

# lambda test


n=randint(10,9999)

tens=lambda x:int(x/10)%10

hunds=lambda x:int(x/100)%10

thous=lambda x:int(x/1000)%10


print(n)

print(tens(n))

print(hunds(n))

print(thous(n))


print("List:")

l1=[1,2,3,4,5,6]

print(l1)


print("Filter demonstration")

print("Greater than 3")

l2=list(filter(lambda x:x>3,l1))

print(l2)

print("Odd numbers")

l3=list(filter(lambda x:x%2!=0,l1))

print(l3)


print("Map demonstration")

print("Triple the numbers")

l4=list(map(lambda x:3*x,l1))

print(l4)

print("exp(x)-1")

l5=list(map(lambda x:exp(x)-1,l1))

print(l5)


Sources


Maina, Susan "Lambda Functions with Practical Examples in Python"  Towards Data Science (membership blog with limited free access per month)  https://towardsdatascience.com/lambda-functions-with-practical-examples-in-python-45934f3653a8  Retrieved August 29, 2021


Simplilearn  "Learn Lambda in Python with Syntax and Examples"  April 28, 2021. https://www.simplilearn.com/tutorials/python-tutorial/lambda-in-python  Retrieved August 29, 2021


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, September 19, 2021

Differences Between HP 32S and HP 32SII

 Differences Between HP 32S and HP 32SII




The HP 32S and HP 32SII are two classic RPN calculators which feature a rich set of scientific calculations, including logarithms, trigonometry, hyperbolic functions, integer part, fraction part, absolute value, statistics, and linear regression (y = mx + b).  Both are keystroke RPN programming programs with a capacity of 390 bytes.  


What are the differences? 


HP 32S


*  Production:  1988 - 1991


*  Keyboard Colors:  dark brown, almost black keys; one orange shift key


*  One key deals with scrolling:  down, with up shifting


HP 32SII


*  Production:  1991 - 2002


*  Keyboard Colors:  dark brown keys, orange shift key, blue shift key (1st edition); black keys, green shift key, pink shift key


*  One key deals with scrolling:  down, with up shifting


*  Has four sets of US/SI conversions:  kg/lb, °C/°F, cm/in, l/gal


*  Pressing the decimal key ( [ . ] ) twice will create fractions and mixed fractions.   The FDISP toggles between decimal approximation and fractions.  



Menu HP 32S HP 32SII
PARTS [ shift ] [ x<>y ]: IP, FP, RN, ABS [ |> ] [ √ ]: IP, FP, ABS (RN is on the keyboard)
PROB [ shift ] [ 3 ]: COMB, PERM, x!, R# [ |> ] e^x
STAT/LR One group of menus Split into four menus
SHOW [ shift ] [ . ] [ |> ] [ ENTER ]
SOLVE, ∫ [ shift ] [ 1 ] SOLVE: [ |> ] [ 7 ]; ∫: [ |> ] [ 8 ]
LOOP: ISG/DSE [ shift ] [ 5 ] ISG: [ <| ] [ 9 ]; DSE: [ |> ] [ 9 ]
TESTS [ shift ] [ × ]: offers < = ≠ > x?y: [ <| ] [ ÷ ], x?0: [ |> ] [ ÷ ]: offers < ≤ = ≠ > ≥

Hewlett Packard would later release updated versions of the 32S with the ill-fated 33S and the better but not perfect 35S.  

Source:

"HP-32S"  Wikipedia.  Last Edited June 28, 2021.  
https://en.wikipedia.org/wiki/HP-32S   Retrieved July 6, 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, September 18, 2021

Sharp EL-5500III & PC-1403: Complex Number Arithmetic and Vectors

 Sharp EL-5500III & PC-1403:  Complex Number Arithmetic and Vectors


Complex Number Arithmetic

This program calculates the four arithmetic functions for complex numbers in the form of x + i*y, where i = √-1.

Sharp EL-5500III/PC-1403 Program:  Complex Number Arithmetic
RUN 600 (or whatever line you designate)

600 PRINT "COMPLEX ARITHMETIC"
603 INPUT "A? "; A, "Bi? "; B, "C? "; C, "Di? "; D
606 INPUT "1:+ 2:- 3:* 4:/ :"; H
609 IF H=1 THEN 630
612 IF H=2 THEN 640
615 IF H=3 THEN 650
618 IF H=4 THEN 660
621 GOTO 606
630 PRINT A+C; "+ "; B+D; "i": END
640 PRINT A-C; "+ "; B-D; "i": END
650 PRINT A*C-B*D; "+ "; B*C+A*D; "i": END
660 W=(C^2+D^2)
663 PRINT (A*C+B*D)/W; "+ "; (B*C-A*D)/W; "i": END

Example

a + bi = 8 + 3i;  c + di = -4 + 2i
Add: 4 + 5i
Subtract: 12 + 1i
Multiply: -38 + 4i
Divide:  -1.3 + -1.4i

Vectors

This program calculates the dot product, cross product, and the angle between of two vectors.   

Sharp EL-5500III/PC-1403 Program:  Vectors
RUN 800 (or whatever line you designate)

800 PRINT "TWO VECTORS"
803 DIM A(2): DIM B(2)
806 INPUT "A0? "; A(0), "A1? "; A(1), "A2? "; A(2)
809 INPUT "B0? "; B(0), "B1? "; B(1), "B2? "; B(2)
812 INPUT "1.DOT 2.CROSS 3.ANGLE :"; H
815 IF H=1 THEN 830
818 IF H=2 THEN 840
821 IF H=3 THEN 850
824 GOTO 812
830 D=A(0)*B(0)+A(1)*B(1)+A(2)*B(2)
832 PRINT "DOT = ";D : END
840 DIM R(2): R(0)=A(1)*B(2)-A(2)*B(1)
842 R(1)=A(2)*B(0)-A(0)*B(2)
844 R(2)=A(0)*B(1)-A(1)*B(0)
846 PRINT "R0:";R(0) :PRINT "R1:";R(1) :PRINT "R2:";R(2)
848 END
850 X=√(A(0)^2+A(1)^2+A(2)^2)
852 Y=√(B(0)^2+B(1)^2+B(2)^2)
854 D=A(0)*B(0)+A(1)*B(1)+A(2)*B(2)
856 N= ACS (D/(X*Y))
858 PRINT "ANG = "; N: END

Example (Degrees mode set)

A:  A(0) = 4, A(1) = -3, A(2) = 2
B:  B(0) = 6, B(1) = 7, B(2) = -1
Dot:  1
Cross: R(0) = -11, R(1) = 16, R(2) = 46
Angle:  88.85263015°

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, September 13, 2021

Retro Review: Lloyd's Accumatic 321

Retro Review: Lloyd's Accumatic 321







Quick Facts


Model: 321

Company: Lloyd's   (Japan)

Years: 1975 

Memory Register:  1 independent memory

Battery:  Either 4 AAA batteries or the use of a 6V DC 300mW, Series 255A AC adapter

Screen:  LCD, blue-green digits, 8 digits


Features


The Accumatic 321 is a four function calculator with additional features:


*  Parenthesis

*  Square  (x^2)

*  Reciprocal (1/X)


The square (x^2), square root (√), and reciprocal (1/X) act immediately on the number on the display.  


The 321 operates in chain mode: which means that the operations are done in the way the keys are pressed.  Thankfully the parenthesis keys are there to assist us in following the order of operations, which we will have to deal with manually.  Case in point with two examples:


Example 1:


6 [ + ] 3 [ × ] 7 [ = ]  returns 63


Parenthesis are needed to invoke the proper order of operations:


[ ( ] 6 [ + ] 3 [ ) ] [ × ] 7 [ = ] returns 63


6 [ + ] [ ( ] 3 [ × ] 7 [ ) ] [ = ]  returns 27



Example 2:


5 [ × ] 8 [ - ] 4 [ × ] 3 [ = ] returns 108


Parenthesis are needed to invoke the proper order of operations:


 [ ( ] 5 [ × ] 8 [ ) ] [ - ] [ ( ] 4 [ × ] 3 [ ) ] [ = ] returns 32



Additional Calculations


There may be more than one keystroke sequence to tackle each problem.  



1/(1/5 - 1/8) = 13.333333...


5 [ 1/X ] [ - ] 8 [ 1/X ]  [ = ] [ 1/X ]




5.99 * 11 - 2.95 * 2 plus 10% sales tax.   Total:  46.519


[ MC ] 5.99 [ × ] 11 [ = ] [ M+ ] 

2.95 [ × ] 2 [ = ] [ M- ]

[ MR ] [ + ] 10 [ % ] [ = ]




√(4^2 + 7^2 + 10^2) ≈ 12.845232


4 [ X^2 ] [ + ] 7 [ X^2 ] [ + ] 10 [ X^2 ] [ = ] [ √ ]



Verdict


As suggested by the seller, the keyboard is fragile; extra care is needed.  The keys are legible and have good color contrast.  The keys need a solid press.  However, holding down the key too long will cause a double entry.  The additional reciprocal, square, and parenthesis are welcome to basic calculators.  I wish modern basic calculators would add these keys plus the pi (π) key.


I purchased the 321 for $13.00 which has the AC adapter.  I like the fact that batteries not required (in fact, the battery case must be empty) to operate the calculator with the AC adapter.  Worth the buy.



Source


Dudek, Emil J.  "Calculators: Handheld:  Lloyd's Accumatic 321 (aka E321)" 2021.  Retrieved September 4, 2021.  https://vintage-technology.club/pages/calculators/l/lloyds321.htm


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, September 12, 2021

Square Root Trick - by @Mathsbook7474

TI-84 Plus CE and TI-Nspire CX II:  Square Root Trick - by @Mathsbook7474


Introduction


From the Instagram account @Mathsbook7474, it is stated that the square root of a number can be approximated by:


√x ≈ (x + y) ÷ (2 · √y)


where y is the number nearest to the root, preferably a perfect square.  (see source for the link)


For example:


Approximate √52.


Let x = 52.  Note that 49 is a perfect square near to 52.   Since √49 = 7, let y = 49.


√52 ≈ (52 + 49) ÷ (2 · √49) = 7.214285714


Accuracy:  0.0031831631   (√52 = 7.211102551)


TI-84 Plus CE Program:  SQAPPROX


The program SQAPPROX will calculate the approximation above, the actual root, and compare the results for the accuracy.  


Listing:


Download the program here:  

TI-Nspire CX II tns File:  square root approximate.py

This document takes it a step further.   The python program will create four lists that are used to display a table, graph the approximate answers, the actual answers, and the error.

Python program:  spapprox.py

from math import *
from ti_system import *

# TI System command clear history
clear_history()

# intro and prompts
# characters use ctrl, [ book ]
print("√x≈(x+y)/(2*√y) @mathsbook7474")
print("For x:")
s0=float(input("start: "))
s1=float(input("stop: "))

# set up columns
col1=[]
col2=[]
col3=[]
col4=[]

for i in range(s0,s1+1):
  col1.append(i)
  w=sqrt(i)
  col2.append(w)
  a=trunc(w)
  b=trunc(w)+1
  c=fabs(a**2-i)
  d=fabs(b**2-i)
  if c<d:
    s=(i+a**2)/(2*a)
  else:
    s=(i+b**2)/(2*b)
  col3.append(s)
  r=fabs(w-s)
  col4.append(r)


# save columns to outside variables
# TI System module used
store_list("data",col1)
store_list("act",col2)
store_list("appr",col3)
store_list("error",col4)

print("data = x")
print("act = actual")
print("appr = approximate")
print("error = absolute error")

Download the file here:


Source:

"Square Root Trick"  @mathsbook7474.  Instagram account.  
June 8, 2021.  Retrieved June 21, 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, September 11, 2021

Sharp EL-5500 III & PC-1403: Fan Laws and Voltage Drop Percentage

 Sharp EL-5500 III & PC-1403: Fan Laws and Voltage Drop Percentage



Fan Laws 

The program will calculate RPM_new (Revolutions per Minute), SP_new (Static Pressure), and BHP_new (Brake Horsepower).  

Inputs:
CFM_old:  Cubic Feet of Minute - old
CFM_new:  Cubic Feet of Minute - new
RPM_old:  Revolutions per Minute - old
SP_old:  Static Pressure - old
BHP_old:  Brake Horsepower - old

Outputs:
RPM_new
SP_new
BHP_new

Sharp EL-5500III/PC-1403 Program:  Fan Laws
RUN 700 (or whatever line you designate)

700 PRINT "FUN LAWS"
703 INPUT "CFM.OLD? "; A
706 INPUT "CFM.NEW? "; B
709 INPUT "RPM.OLD? "; C
712 INPUT "SP.OLD? "; E
715 INPUT "BHP.OLD? "; G
718 D = B*C/A
721 F = E*B^2/A^2
724 H = G*B^3/A^3
727 PRINT "RPM.NEW: "; D
730 PRINT "SP.NET: "; F
733 PRINT "BHP.NEW: "; H
736 END

Example

Inputs:
CFM.OLD:  1250 CFM
CFM.NEW: 1600 CFM
RPM.OLD:  840 RPM
SP.OLD: 4 in
BHP.OLD: 7 BHP

Results:
RPM.NEW: 1075.2 RPM
SP.NEW: 6.5536 in
BHP.OLD:  14.680064 BHP

Source:
Calculated Industries "Sheet Metal/HVAC Pro Calc User's Guide" 2021

Voltage Drop Percentage

This program calculates the voltage drop percentage for wires that operate in 75°C, given the wire length from the object to the power source for wires 2, 4, 6, 8, 10 and 12.  The NEC 2020 code is used.  

Sharp EL-5500III/PC-1403 Program:  Voltage Drop Percentage
RUN 500 (or whatever line you designate)

500 PRINT "VOLTAGE DROP 75 DEG"
501 CLEAR
503 DIM S(5)
506 REM NEC 2020
509 S(0) = .194
510 S(1) = .308
511 S(2) = .491
512 S(3) = .778
513 S(4) = 1.24
514 S(5) = 1.98
530 INPUT "VOLTS? "; V
533 INPUT "CURRENT? "; A
536 INPUT "WIRE LGTH TO PWR (FT)? "; L
539 INPUT "#2,4,6,8,10,12? "; J
542 J = J/2 - 1
545 W = S(J)
548 D = (A*W/1000*2*L) / V * 100
551 PRINT "VD = "; D; "%"
554 END

Example

Inputs: 
VOLTS:  80 V
CURRENT: 36 A
WIRE LGTH TO PWR (FT): 140 ft 
#8 wire

Result: 
VD = 9.8028%

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, September 6, 2021

Swiss Micros DM42: Subfactorial and Numworks Update (16.3)

Swiss Micros DM42: Subfactorial


Happy Labor Day!


This is a request by Marko Draisma and gratitude to Mr. Draisma.


Calculating the Subfactorial


A common,  and perhaps the most straight forward, formula to calculate the subfactorial is:  


!n = n! × Σ((-1)^k ÷ k!, k=0 to n)


Yes, the subfactorial is written with the exclamation point first.  The subfactorial finds all the possible arrangements of a set of objects where none of the objects end up in their original position.


For example, when arranging the set {1, 2, 3, 4} the subfactorial counts sets such as {2, 1, 4, 3} and {3, 4, 1, 2} but not {1, 4, 3, 2}.  For the positive integers:   !n < n!.


I am going to present two programs.  The first will use the formula stated above.


The second uses this formula, which will not require recursion or loops:


!n = floor[ (e + 1/e) × n! ] - floor[ e × n! ]


Note: Since the N! function on the DM42 accepts only positive integers, we can use the IP (integer part) to simulate the floor function.


integer(x) = { floor(x) if x ≥ 0,  ceiling(x) if x < 0


The following programs can be used on Free42, HP 42S, or Swiss Micros DM42.


Swiss Micros DM42 Program:  Subfactorial Version 1


This is a traditional route.  Registers used:


R01:  k,  counter

R02:  sum register 

R03:  n!, later !n


Program labels can start with symbols on the 42S.


01  LBL "!N"

02  STO 01

03  N!

04  STO 03

05  0

06  STO 02

07  RCL 01

08  1E3

09  ÷

10  STO 01

11  LBL 00

12  RCL 01

13  IP

14  ENTER

15  ENTER

16  -1

17  X<>Y 

18  Y↑X

19  X<>Y

20  N!

21  ÷

22  STO+ 02

23  ISG 01

24  GTO 00

25  RCL 02

26  RCL× 03

27  STO 03

28  RTN


Swiss Micros DM42 Program:  Subfactorial Version 2


I only put 2 in the label to distinguish the two programs.  


01  LBL "!N 2"

02  N!

03  ENTER

04  ENTER

05  1

06  E↑X

07  ENTER

08  1/X

09  +

10  ×

11  IP

12  X<>Y

13  1

14  E↑X

15  ×

16  IP

17  -

18  RTN



Examples


!2 = 1

!3 = 2

!4 = 9

!5 = 44

!9 = 133,496

!14 ≈ 3.2071E10


Sources


"Calculus How To:  Subfactorial"   College Help Central, LLC .https://www.calculushowto.com/subfactorial/ Retrieved September 5, 2021. 



Weisstein, Eric W. "Subfactorial." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Subfactorial.html  Retrieved September 5, 2021


Numworks 16.3 Update

Numworks recently updated its firmware to Version 16.3.  Find details of the changes and additions here:

https://my.numworks.com/firmwares

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, September 5, 2021

TI-Nspire CX II and TI-84 Plus CE: COUNTIF, SUMIF, AVERAGEIF

TI-Nspire CX II and TI-84 Plus CE:  COUNTIF, SUMIF, AVERAGEIF


Introduction


Three popular spreadsheet functions are operating on elements of a list contingent of a criteria.   


Let L be a list of numerical data.


COUNTIF(L, criteria):   returns a count of all the elements that fit a criteria


SUMIF(L, criteria):  returns the sum of all the elements that fit a criteria


AVERAGEIF(L, criteria):  returns the arithmetic average of all the elements that fit a criteria


Example:


L = {0, 1, 2, 3, 4, 5, 6}


COUNTIF(L, "≥4") = 3.  

Counts all the elements of L that are greater than or equal to 4.


SUMIF(L, "≥4") = 15

Sums all the element's of L that are greater than or equal to 4. 


AVERAGEIF(L, "≥4") = 5

Returns the arithmetic average of L that are greater than or equal to 4.


Note that:


AVERAGEIF(L, criteria) = SUMIF(L, criteria) ÷ COUNTIF(L, criteria)


TI-Nspire CX II:  The functions countif and sumif


The TI-Nspire has two built in functions countif and sumif.  The averageif can easily be defined in the equation from the last section.


You can download a tns demonstration document here:  

https://drive.google.com/file/d/1XfRyHSQz92TXGmzohhej0--wLYS0yxkF/view?usp=sharing


TI-84 Plus CE Programs:  LISTIF


The program LISTIF calculates all three functions COUNTIF, SUMIF, and AVERAGEIF.  There are two custom lists that are created as a result of this program:


List A:  The input list.


List B:  The list that meets the criteria.


To get the small "L" character, press [ 2nd ], [ stat ] (LIST), B* for the small L.   The small L must be the first character of your list name.  Once created, custom lists are shown under the LIST - NAMES menu.


Although I did not test this on previous calculators, this program should work on the TI-82, TI-83 family, and all of the TI-84 Plus family.


Program listing:


Download Link:

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, September 4, 2021

Retro Review: Novus 4510 - Mathematician

Retro Review: Novus 4510 - Mathematician


Happy Labor Day!   Hopefully you are safe, healthy, and sane.






Quick Facts:


Model: 4510, also known as Mathematician

Company: National Semiconductor

Years: 1975 - 1977

Memory Register:  1 independent memory, cleared when it is turned off

Battery:  1 9-volt battery, could be powered by a certain AC Volt plugs

Screen:  LCD, 8 digits


A RPN Calculator from the 1970s


The Mathematician is a Reverse Polish Notation (RPN) calculator.  On an RPN calculator, instead of an equals key, you have an ENTER key to separate numbers and execute an operation to complete the calculation.


Examples:


400 ÷ 25 = 16

Keystrokes: 

400 ENT 25 ÷


(21 × 5) + (11 × 13) = 248

Keystrokes:

21 ENT 5 × 11 ENT 13 × + 


√(3^2 + 2^3) ≈ 3.3166238

Keystrokes:

3 [ F ] (x^2) ENT 2 ENT y^x + √


Forensic Results:


3 × 1/3 returns .99999999


asin(acos(atan(tan(cos(sin(60°)))))) returns 59.25697°


Keyboard


The keyboard of Novus 4510 has gray and ivory keys.  The font is a light gray against a black background, with shifted functions are in yellow, which gives the fonts great contrast.  The keys are rubbery and soft, and thankfully, the 4510 I was purchased had working keys.  


The Basic Set of Functions


The 4510 has a basic set of scientific functions:  principal square root, square root, powers, reciprocal, logarithms and exponents, and trigonometric functions.  The angle mode will always be in degrees.   The deg and rad commands are not mode settings, they are conversions:  deg changes angles from radians to degrees, and rad changes angles from degrees to radians.


There is no scientific notation on the 4510.  You are limited to 8 digits.  Anything over beyond ±99,999,999 will cause an error.


Any errors will be displayed by .0.0.0.0.0.0.0.0.


There is only one memory register.  The storage arithmetic functions available are M+, M-, and M+x^2 (square the value on the x register and adds it to memory).


The Stack of Three Levels


The 4510 has three stack levels:  x, y, z.    How the stack reacts depends on which operation is executed.  For example:


The ENT (Enter) Key:

x, y, z ->  x, x, y


The Arithmetic Operators (+, -, ×, ÷):

x, y, z ->  result, y, 0

The contents of the z stack are zeroed, which unusual for RPN calculators.


The functions x^2, √, 1/x, rad, deg:

x, y, z -> result, y, z


The Trigonometric, Exponential, and Exponential Operators (sin, cos, tan, and their inverses, log, ln, e^x):

x, y, z -> result, y, 0

The contents of the z stack are zeroed, which unusual for RPN calculators.


That makes for a very particular set up due to the usual stack operations, for example:  


sin 30° sin 40° sin 60°


Key strokes: 


30 sin 40 sin 60 sin × × returns the very incorrect answer 0


However:


30 sin 40 sin × 60 × returns the correct approximation .27833519


There is a swap key but there is no roll down key.    


Verdict


I like operating the 4510.  However, my biggest gripes are the way the stack is used depending on the operation, and the lack of operations and statistics.  It's good for a basic RPN calculator.  


Sources


"National Semiconductor Novus Mathematics Handled Electronic Calculator"  National Museum of American History Behring Center.  Washington, D.C.  Accessed August 15, 2021.  https://americanhistory.si.edu/collections/search/object/nmah_1305810



"Novus 4510 (Mathematician)"  calculator.org:  the calculator home page.  Flow Simulation Ltd. 2021  Accessed August 14, 2021.  https://www.calculator.org/calculators/Novus_4510.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. 


Σ(1 / (a^n)) from n=1 to m

 Σ(1 / (a^n)) from n=1 to m This blog entry covers the sum of the series: Σ[1 / (a^n), n=1 to m] with n and m positive integers Specific Cas...