Saturday, May 15, 2021

Retro Review and Comparison: TI-82 Advanced

 Retro Review and Comparison: TI-82 Advanced




I can officially say that I have a French calculator.  


Quick Facts:


Models:  TI-82 Advanced

Company:  Texas Instruments

Manufactured: 2015-2021

Type:  Graphing

Battery:  4 AAA

Country: France


Keyboard


All the TI-82 Advanced is a French calculator, where the keys and functions are in French.  Examples include:


French:  suppr,  English:  delete


French:  dessin,  English:  draw


French:  annul,  English: clear


French:  rappel,  English: recall



I like the how the keys respond and how comfortable the keys feel.  The screen is a monochrome screen but the contrast between the screen and its text.  


More Like the TI-84 Plus


The TI-82 Advanced is pretty much the equivalent of the TI-84 Plus.  I put together a comparison table between three calculators:


*  The basic TI-82 (United States)

*  TI-82 Advanced

*  TI-84 Plus  (monochrome screen)


The table lists the commands available in several menus including Lists, Distributions, Program Editing, and Variables.  You can download the comparison here.  


Python to Come


In the Fall of 2021, Texas Instruments will release the next version of the TI-82 Advanced: the TI-82 Advanced Edition Python.  The new TI-82 Advanced will retain the classic TI-82 casing, including being powered by AAA batteries, but will have a color screen and have a Python programming mode. 


You can read the about the TI-82 Advanced Edition Python here:


https://education.ti.com/fr/produits/calculatrices/graphiques/ti-82-advanced-edition-python  (French)


https://tiplanet.org/forum/viewtopic.php?p=259509#p259509 (French)


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, May 9, 2021

HP 12C: Bubble Sort

HP 12C: Bubble Sort


Sorting Numbers


The program below uses a bubble sort to sort the numbers in stacks R1, R2, R3, and R4 (this can be varied).   A bubble sort is a simple, but timely, sorting algorithm by taking two elements and swapping them if needed.  The bubble sort algorithm does not have a mechanism to determine if the sort is completed, therefore several passes are required to guarantee that everything is sorted properly.   


I recommend that you use the newer 12C calculators (those that are powered with 2 CR2032 batteries, for instance, manufactured today) due to the increase in processing speed.


An example sort:

74, 56, 66, 82


Numbers that are compared are in red. 


Pass 1:

74, 56, 66, 82

56, 74, 66, 82

56, 66, 74, 82


Pass 2:

56, 66, 74, 82

56, 66, 74, 82

56, 66, 74, 82


At this point we know the sort is done, but the algorithm does not know it.  


Pass 3:

56, 66, 74, 82

56, 66, 74, 82

56, 66, 74, 82


Final:

56, 66, 74, 82



HP 12C Program:  Bubble Sort of Four Numbers


This program sorts the numbers in the registers R1, R2, R3, and R4.  A counter number is stored in R0.  


STEP KEY         KEY CODE

01 3         3 // store the counter, n-1 numbers    

02 STO 0 44, 0

03 RCL 4 45, 4 // main loop starts here

04 RCL 3 45, 3

05 x ≤ y 43, 34

06 x <> y 34

07 STO 4 44, 4

08 R ↓         33

09 STO 3 44, 3

10 RCL 2 45, 2

11 x ≤ y 43, 34

12 x <> y 34

13 STO 3 44, 3

14 R ↓         33

15 STO 2 44, 2

16 RCL 1 45, 1

17 x ≤ y 43, 34

18 x <> y 34

19 STO 2 44, 2

20 R ↓         33

21 STO 1 44, 1

22 1         1

23 STO- 0         44, 30, 0

24 RCL 0 45, 0

25 x = 0 43, 35

26 GTO 00         43, 33, 00 // if R0 = 0, end the program

27 GTO 03         43, 33, 03 // if not, repeat the main loop


Instructions


1.  Store four numbers in the registers R1, R2, R3, and R4.

2.  Run the program.  A 0 will indicate when the program is done.

3.  Numbers stored in ascending order will be stored:  least in R1 to most in R4.


You can modify the program to include as many registers as memory allows.  Keep in mind the structure:


n-1 //  n = number of registers

STO 0

// start main loop

RCL i

RCL i-1

x ≤ y

x <> y

STO i

R ↓

STO i-1 // reduce i by 1 until i = 2

// adjust counter

1 // last lines start here, need at least 6 lines for this

STO- 0

RCL 0

x = 0

GTO 00

GTO 03


Examples


Example 1:

R1:  866, R2:  501, R3:  928, R4: 563

Result:

R1:  501, R2:  562, R3:  866,  R4:  928


Example 2:

R1:  314, R2:  506,  R3:  497,  R4:  621

Result:

R1:  314, R2:  497,  R3:  506,  R4:  621


Example 3:

R1:  -76,  R2:  68,  R3:  94,  R4: -11

Result:

R1:  -76,  R2:  -11, R3:  68,  R4:  94


Source


Personal Programmers Club. (various authors)   "Special Routines Issue"  Vol. 5 No. 7 August 1978  Publication: Santa Ana, CA 


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, May 8, 2021

Some PPC Journal Programs Ported to HP 12C, TI-84 Plus CE Gets Python in the United States

Some PPC Journal Programs Ported to HP 12C, TI-84 Plus CE Gets Python in the United States


Introduction


In 1978, the Personal Programmers Club wrote an issue containing short utility programs for the classic HP 25A and HP 67 calculators.  On today's blog, I am going to port some of these routines for the HP 12C financial calculator.   The calculator codes come from the standard-RPN HP 12C (99 step capacity).  For those using a HP 12C Platinum, some key codes will differ (example: LST X).


See the Source section for more details.


HP 12C Program:  Modulo Division (remainder)


Original HP 25A and HP 67 (section C1) program by John Kennedy.


This program uses register 1, but any register can be used.  This program works best when x and y are both positive.



01 x<>y 34

02 STO 1 44, 1

03 x<>y 34

04 STO÷ 1         44, 10, 1

05 RCL 1 45, 1

06 INTG 43, 25

07 ×         20

08 -         30

09 GTO 00         43, 33, 00


If you want the result of the division with both the integer and remainder part, press RCL 1.


Example:


4758 mod 360 = 78


4758, ENTER, 360, R/S


HP 12C Program:  Infinite Division


Original HP 25A and HP 67 (section C2) program by John Kennedy.  


This program allows you to see each digit of a division y/x, one digit at a time.  It does not tell you where the decimal point is, you will need to determine that on your own.  


The original code for the HP 25A took the advantage of the storage registers R3 and R7.  In statistics, R3 = n and R7 = ∑x allowing for the mean function to calculate the division.  It was assumed that two registers are cleared before program execution.  


The original code also pause for each digit.  The HP 12C does not have a pause command, so I used the run/stop (R/S) command instead.  


01 STO 1 44, 1

02 x<>y 34

03 STO 2 44, 2  // main loop begins here

04 RCL 1 45, 1

05 STO÷ 2         44, 10, 2

06 RCL 2 45, 2

07 INTG 43, 25

08 R/S         31 // display the digit

09 ×         20

10 -         30

11 1         1

12 0         0

13 ×         20

14 GTO 03         43, 33, 03


Example:  Find the decimal equivalent of 45/78.


45, ENTER, 78, R/S   (R/S for each digit)


Results: 0, 7, 8, 9, 4, 7 (and so on)


45/78 = 0.78947368421052631...


HP 12C: Reverse of Integer's Digits


Original HP 25A and HP 67 (section D7) program by Jim Davidson


This program reverses the digits of an integer.   Example: the program transforms 82531 to 13258.


01 STO 0 44, 0

02 STO- 0         44, 30, 0

03 FRAC 43, 24

04 STO+ 0         44, 40, 0

05 LST x 43, 36

06 INTG 43, 25

07 .         48

08 1         1

09 STO÷ 0         44, 10, 0

10 ×         20

11 x=0         43, 35

12 STO 14         43, 33, 14

13 GTO 03         43, 33, 03

14 RCL 0 45, 0

15 GTO 00         43, 33, 00


Example:  Reverse the digits of 90649.


90649, R/S


Result:  94609



Source


Personal Programmers Club. (various authors)   "Special Routines Issue"  Vol. 5 No. 7 August 1978  Publication: Santa Ana, CA 


TI-84 Plus CE Gets Python (in the U.S.)

TI-84 Plus CE Python Comes to the United States this fall.  Texas Instruments already has two Python powered calculators in the TI-84 family in France:

*  TI-83 Premium CE Edition Python (current - rechargeable battery)
*  TI-82 Advanced Edition Python (to come in Fall 2021 - powered by AAA batteries)

The TI-84 Plus CE Python will have a rechargeable battery.  More information is found here:  https://education.ti.com/en/products/calculators/graphing-calculators/ti-84-plus-ce-python


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. 


Friday, May 7, 2021

HP Prime Firmware Update (Beta) - Python Becomes Available

 HP Prime Firmware Update (Beta) - Python Becomes Available 


Special thanks to go the HP Calculator Team for the new updates for the HP Prime. 


What's New?


This is not an all-inclusive list. (All screen shots are from the 5/5/2021 firmware).


*  Polynomial Roots Wizard.  Path:  [ Toolbox ], ( CAS ), 6.  Polynomial, 7.  Polynomial roots wizard.   We can calculate either the roots of a polynomial or build a polynomial from their roots.  For the 5/5/21 update, the graph on the polynomial appears for any polynomial with real coefficients.


*  Probability Wizard:  Calculate and draw probability distributions for the Normal (z), Student (t), ChiSquare ( χ^2), Fisher (F), and Geometric.  Path:  [ Toolbox ], ( Math ), 5. Probability, 4. Prob Wizard


Both wizards can be accessed no matter what App is running. :) 

*  Intelligent Math:   When checked in the Home options, certain calculations return exact results.   I will probably have this turned on at all times.



*  Save and Load States:  You can save the contents of the Home screen, settings, inputs, results, home variables, user variables, and lists. 

*  Python Programming App. (Micropython) There are two main screens.  [ Symb ] brings up the editor and [ Num ] brings up the terminator.  In the current firmware, we can have more than one script, but pressing [ Num ] will import all the scripts automatically.   I anticipate heavy use of the def-return structures.  In the future I am going to include python scripts to be used with the HP Prime.

Modules Available (5/5/2021 firmware) (not an all inclusive list):
* array
* math
* cmath
* ustruct
* utimeq
* urandom
* cas  (HP Prime exclusive, I think) 
* hpprime (HP Prime exclusive)
* linalg
* matplotl
(and more)


Firmware Available

4/28/2021:

Connectivity Kit (Beta)
Emulator (Beta)
Calculator Firmware for both G1 and G2 (hardware) (Beta):


5/5/2021:

Calculator Firmware only:

Copy this into File Explorer (Windows)
ftp://ftp.hp.com/pub/calculators/Prime/

I'm not sure if the above method work for MacOS (at this time).  TI-Planet (see link below) also has a direct download.  

Documentation

A thread on the 4/28/2021 update (MoHPC):


 Here is a thread on the 5/5/2021 update (MoHPC):


Discussion on TI-Planet (French, can be translated into English):



Any further updates will be posted as they come.  

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, May 2, 2021

TI-84 Plus CE and Casio fx-CG50: Interest Only Loans

TI-84 Plus CE and Casio fx-CG50:  Interest Only Loans


Interest Only Loan: Is it a Good Idea?


An interest-only loan is a loan where you pay only the interest of a loan, at least for a certain amount of time.  Why would some one want to engage an interest only loan?  The payment for when you are paying just the interest is lower.  However, the principal does not go down during that time, and the principal of the loan is going to have to be paid sometime.


Interest only loans can be helpful for people who expect a large increase of income in the near future or for those who like to flip properties.  Personally, I don't recommend it, when I take a loan, I want to pay off a portion of the principal each payment.  


The programs presented here will calculate:


*  The payment during the interest only term

*  The remaining payment when principal starts becoming due

*  The total cash outflow with the total interest paid, which will definitely be higher than the traditional route


Inputs:


*  INTEREST YEARS?:   The number of years where a loaner pays only interest.   Assume that the interest only payments occur at the beginning of the loan.

*  PRINCIPAL YEARS?:  The number of years where principal is paid.


Example:  For a 5/25 loan:

INTEREST YEARS = 5

PRINCIPAL YEARS = 25


* INTEREST RATE:  The annual interest rate of a loan

* PV:  Amount of the loan (present value)


The calculation assumes that there is no balloon payment (FV = 0).


TI-84 Plus Program:  INTONLY


"EWS 2021-03-13"

ClrHome

Disp "INTEREST ONLY LOAN"

Input "INTEREST YEARS? ",T

Input "PRINCIPAL YEARS? ",Y

Input "INTEREST RATE? ",R

Input "PV? ",P

P*R/1200→U

­-tvm_Pmt(12Y,R,P,0,12,12)→V

Disp "INT ONLY PMT:",U

Disp "REMAINING PMT:",V

Pause 

12(T*U+Y*V)→W

W-P→X

Disp "TOTAL PMTS:",W

Disp "TOTAL INTEREST:",X


Casio fx-CG50 Program:  INTONLY


"EWS 2021-03-14"

ClrText

"INTEREST ONLY LOAN"

"INTEREST YEARS"?->T

"PRINCIPAL YEARS"?->Y

"INTEREST RATE"?->R

"PV"?->P

P*R/1200->U

(-)Cmpd_PMT(12Y,R,P,0,12,12)->V

"INT ONLY PMT:"

U ⊿

"REMAINING PMT:"

V ⊿

12(T*U+Y*V)->W

W-P->X

"TOTAL PMTS:"

W ⊿

"TOTAL INTEREST:"

X


Example


5/30 4% interest rate only.  Loan amount $250,000


INTEREST YEARS: 5

PRINCIPAL YEARS: 30

INTEREST RATE: 4

PV:  250000


Results:  

INT ONLY PMT:  833.3333333

REAMINING PMT:  1193.538239

TOTAL PMTS:  479673.7659

TOTAL INTEREST:  229673.7659


Source:

Kapfidze, Tendayi  "What Is an Interest-Only Mortgage and How Does It Work?"  Edited by Deborah Kearns  LendingTree.  LendingTree, LLC, Charlotte, NC:  2021.   https://www.lendingtree.com/home/mortgage/interest-only-mortgages/  Retrieved 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, May 1, 2021

TI-84 Plus CE and Casio fx-CG50: Confusion Matrix, Practice SAT Questions with Mometrix

TI-84 Plus CE and Casio fx-CG50:  Confusion Matrix, Practice SAT Questions with Mometrix 

Confusion Matrix

Introduction


In statistical applications, particularly in medicine, we hear about the infection rates of a disease and tests that are created to designate whether people are infected with the disease.  No test, at least not any that I heard of, is 100% accurate in detecting whether a person is infected with a certain virus.  


Tables can be used to summarize the accuracy of a test, measuring one of four outcomes:


true positive (TP):  the person is infected with a virus and the test detects the virus


false negative (FN):  the person is infected with a virus but the test fails to detect it


false positive (FP):  the test states the person is infected when in reality the person does not have the virus


true negative (TN):  the person is not infected and the test accurate detects the person is healthy (does not have the virus)



One of the common names for this type of table is a confusion matrix. 


Two of the many measurements that can be made from a confusion matrix are called sensitivity and specificity.



Sensitivity is the ratio of true positive results against all of the population that is infected.  


Sensitivity = true positive / (true positive + false negative)




Specificity is the ratio of true negative results against all fo the population that is not infected.  


Specificity = true negative / (false negative + true positive)



The program CONFUSE creates two 3 x 3 matrices (see the illustration below):




Matrix A:  Theoretical confusion table.  This takes into consideration the infection rate and test rate and calculates the expected values.


Matrix B:  Simulated confusion table.  The test uses a random number generator to simulate the chance of whether a person is infected by using the infection rate and whether a person's test is correct by using the test rate.  The results will vary.  



TI-84 Plus CE Program: CONFUSE


"EWS 2021-03-10"

ClrHome

DelVar [A]

DelVar [B]

{3,3}→dim([A])

{3,3}→dim([B])

Disp "CONFUSION MATRIX"

Input "POPULATION? ",N

Input "INFECTION RATE? ",C

Input "TEST RATE? ",T

N*C→[A](3,1)

N*(1-C)→[A](3,2)

[A](3,1)+[A](3,2)→[A](3,3)

[A](3,1)*T→[A](1,1)

[A](3,1)*(1-T)→[A](2,1)

[A](3,2)*(1-T)→[A](1,2)

[A](3,2)*T→[A](2,2)

[A](1,1)+[A](1,2)→[A](1,3)

[A](2,1)+[A](2,2)→[A](2,3)

For(I,1,N)

rand→R

[B](3,1)+(R≤C)→[B](3,1)

[B](3,2)+(R>C)→[B](3,2)

End

[B](3,1)+[B](3,2)→[B](3,3)

For(I,1,[B](3,1))

rand→R

[B](1,1)+(R≤T)→[B](1,1)

[B](2,1)+(R>T)→[B](2,1)

End

For(I,1,[B](3,2))

rand→R

[B](1,2)+(R>T)→[B](1,2)

[B](2,2)+(R≤T)→[B](2,2)

End

[B](1,1)+[B](1,2)→[B](1,3)

[B](2,1)+[B](2,2)→[B](2,3)

ClrHome

Disp "THEORY [A]"

Pause [A]

ClrHome

Disp "SIMULATION [B]"

Pause [B]

Disp "SENSITIVITY",[B](1,1)/[B](3,1)

Disp "SPECIFICITY",[B](2,2)/[B](3,2)


Casio fx-CG50 Program:  CONFUSE


"EWS 2021-03-13"

ClrText

{3,3}->Dim Mat A

{3,3}->Dim Mat B

"CONFUSION MATRIX"

"POPULATION"?->N

"INFECTION RATE"?->C

"TEST RATE"?->T

N*C->Mat A[3,1]

N*(1-C)->Mat A[3,2]

Mat A[3,1]+Mat A[3,2]->Mat A[3,3]

Mat A[3,1]*T->Mat A[1,1]

Mat A[3,1]*(1-T)->Mat A[2,1]

Mat A[3,2]*(1-T)->Mat A[1,2]

Mat A[3,2]*T->Mat A[2,2]

Mat A[1,1]+Mat A[1,2]->Mat A[1,3]

Mat A[2,1]+Mat A[2,2]->Mat A[2,3]

For 1->I To N

Ran#->R

Mat B[3,1]+(R<=C)->Mat B[3,1]

Mat B[3,2]+(R>C)->Mat B[3,2]

Next

Mat B[3,1]+Mat B[3,2]->Mat B[3,3]

For 1->I To Mat B[3,1]

Ran#->R

Mat B[1,1]+(R<=T)->Mat B[1,1]

Mat B[2,1]+(R>T)->Mat B[2,1]

Next

For 1->I To Mat B[3,2]

Ran#->R

Mat B[1,2]+(R>T)->Mat B[1,2]

Mat B[2,2]+(R<=T)->Mat B[2,2]

Next

Mat B[1,1]+Mat B[1,2]->Mat B[1,3]

Mat B[2,1]+Mat B[2,2]->Mat B[2,3]

ClrText

"_Mat _A: THEORY" ⊿

Mat A ⊿

"_Mat _B: SIMULATION" ⊿

Mat B ⊿

"SENSITIVITY:"

Mat B[1,1]/Mat B[3,1] ⊿

"SPECIFICITY:"

Mat B[2,2]/Mat B[3,2]


Example


Population:  N = 200

Infection Rate:  5%  (enter 0.05)

Successful Test Rate: 80%  (enter 0.80)


Theoretical Matrix (Matrix A):

[[ 8 38 46

2 152 154

10 190 200  ]]


Some simulated results (Matrix B, your results will vary):


Simulation 1:

[[ 7 40 47

1 152 153

8 192 200 ]]


Sensitivity ≈ 0.8750

Specificity ≈ 0.7917


Simulation 2:

[[ 5 34 39

1 160 161

6 194 200 ]]


Sensitivity ≈ 0.8333

Specificity ≈ 0.8247


Sources:


"Confusion Matrix" Wikipedia.  Last Edited February 27, 2021. https://en.wikipedia.org/wiki/Confusion_matrix   Retrieved March 9, 2021. 


Texas Instruments "Webinar:  Modeling as a Tool To Make Sense of the World Around Us" Presented by Gail Burrill and Tom Dick, Ph.D.  https://education.ti.com/en/professional-development/teachers-and-teams/online-learning/on-demand-webinars/2021/mar-09-2021-modeling-as-a-tool-to-make-sense  March 9, 2021


University of Nottingham.  "Accuracy Table" https://www.nottingham.ac.uk/nursing/sonet/rlos/ebp/sensitivity_specificity/page_four.html  Retrieved March 9, 2021


SAT Practice Problems with Mometrix


In 2018, I mentioned that I was going to practice some SAT questions (http://edspi31415.blogspot.com/2018/02/).  If you are taking the SAT or want to practice, a place to go is Mometrix Test Preparation.  Mometrix has online practice tests for reading, writing, and mathematics, as well as official Sample tests.  

Check them out here:  https://www.mometrix.com/academy/sat-practice-test/

Their math page which includes a free online practice test:  https://www.mometrix.com/academy/sat-math-practice-test/

Many thanks to George Bigelow for the information and site.


Disclaimer:  This is not a paid advertisement.  


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, April 25, 2021

HP 12C: Statistical Signal to Noise Ratio

HP 12C:   Statistical Signal to Noise Ratio


Introduction and The Formula


There are many parameters that can be used to measure signal to noise ratio.   Today's formula will concentrate on the statistical measurements of univariate (1-variable) data.  The signal to noise ratio (SNR) is defined as the inverse of the ratio of the coefficient of variation, or the ratio of the mean to deviation.


SNR = mean / deviation


In the sources listed below (see the Sources section), they define the ratio as:


SNR = mean / standard deviation


However, the sources define standard deviation as:


√( ∑(x_i - mean for i = 1 to n) / (1 - n )


This is the formula for sample standard deviation, and that is the deviation this program will use.


HP 12C Program:  SNR


STEP KEY     KEY CODE

01 x-bar 43, 0

02 STO 0 44, 0

03 s         43, 48

04 RCL 0 45, 0

05 x<>y 34

06 ÷         10

07 GTO 00         43, 33, 00


Notes:


1.  x-bar displays the mean for both x and y data in their respective stacks.  Since we are only interested in the x data, I had to store the mean in R0.

2.  Similarly, calling up the s function displays the standard deviation for both x and y. 

3.  In statistics, only certain registers are available for storing values.  The HP 12C stores the following calculations during statistics:  R1: n,  R2: ∑x, R3: ∑x^2, R4: ∑y, R5: ∑y^2, R6: ∑xy.  


Instructions


1.  Clear the statistical data registers by pressing [ f ], [ SST ].

2.  Enter the data by using [ ∑+ ].

3.  Run the program by pressing [ R/S ].


Examples


Note:  The HP 12C is set to Fix 4 mode for these examples.  


Example 1: 

Data:  10, 35, 76, 49, 52, 56

SNR:  2.0883

(Mean:  46.3333,  Sample Standard Deviation:  22.1871)


Example 2:

Data:  50, 30, 20, 35, 25

SNR:  2.78000

(Mean:  32.0000,  Sample Standard Deviation: 11.5109)


Sources


BYJU'S  "Signal to Noise Ratio Formula"  BYJU'S Classes. 2021. https://byjus.com/signal-to-noise-ratio-formula/  Last Retrieved March 23, 2021  


EasyCalculation.com  "How to Calculate Signal to Noise Ratio (SNR) - Tutorial" https://www.easycalculation.com/statistics/learn-signal-to-noise-ratio.php Last Retrieved March 23, 2021


Wikipedia  "Signal-to-noise" https://en.wikipedia.org/wiki/Signal-to-noise_ratio  Retrieved February 27, 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, April 24, 2021

TI-Nspire CX and CX II: Finance Widgets

TI-Nspire CX and CX II:  Finance Widgets


Financial Widgets


The zip file has five widgets:


simple interest widget:  Calculates the total interest paid in a simple interest loan


pi payment widget:  Calculates the payment of a monthly mortgage without a balloon payment.  


piti widget:  Calculates the PITI (payment-interest-tax-insurance) of a mortgage.  Down payment, annual property tax, and annual property insurance are included.


qualified loan amount widget:  Determines the amount of purchase price a buyer can afford.  The standard 28/36 ratio test is used, compares the two methods, and uses the minimum payment to estimate the qualified amount.  


qualified income test widget:  Test whether the proposed PITI and debt payments against a buyer's income  


Instructions


1.  Download the zip file here:  https://drive.google.com/file/d/1cl-yMpcwRHypGa1kdi66ThZs2xf5pPaQ/view?usp=sharing

2.  Save the widget (tns) files to the MyWidgets folder.

3.  Any tns file in the MyWidgets can be opened as a regular document or be added to a document by Insert-Widget.  

4.  When operated as a widget, highlight the entire page by Ctrl+A, pressing [ menu ], selecting 1. Actions, 1.  Evaluate (Enter).  


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, April 18, 2021

Swiss Micros DM16L: Advanced Boolean and Factorial (up to 20)

Swiss Micros DM16L:   Advanced Boolean and Factorial (up to 20)


Introduction


The program listing, for the Swiss Micros DM16L and Hewlett Packard HP 16C,  will assign the following functions to the labels:


A:  NAND:   nand(x, y) = not(x and y)

B:  NOR:   nor(x, y) =  not(x or y)

C:  XNOR:  xnor(x, y) = (not x and not y) or (x and y)

D:  Implication:  y → x = (not y) or x

E:  Factorial:  x!  (x is a positive integer up to 20, 64 word size


NAND, NOR, NXOR, and Implication are advanced Boolean functions.  You can check out program code for the HP Prime here:


http://edspi31415.blogspot.com/2020/03/hp-prime-advanced-boolean-functions.html


Program - DM16L/HP 16C


// NAND

001 43,22,A LBL A

002 42,20   AND

003 42,30   NOT

004 43,21   RTN


// NOR

005 43,22,b LBL B

006 42,40   OR

007 42,30  NOT

008 43,21  RTN


// XNOR

009 43,22,C LBL C

010 44,1    STO 1

011 42,30  NOT

012 34      x<>y

013 44,2    STO 2

014 42,30   NOT

015 42,20   AND

016 45,1    RCL 1

017 45,2    RCL 2

018 42,20  AND

019 42,40   OR

020 43,21   RTN


// Implication

021 43,22,d LBL D

022 34      x<>y

023 42,30   NOT

024 42,40   OR

025 43,21   RTN


// Factorial

026 43,22,E LBL E

027 44,32  STO I

028 1      1

029 44,1    STO 1

030 43,22,1 LBL 1

031 45,1    RCL 1

032 45,32   RCL I

033 20      ×

034  44,1    STO 1

035 43,23   DSZ

036 22,1    GTO 1

037 45,1    RCL 1

038 43,21   RTN


Examples


Let:

R1 = 1011 0001

R2 = 1100 1100


Set up: 2-16-0000 (2's complement, 16 bits)


RCL 2, RCL 1, GSB A NAND(R2, R1):  0111 1111*

RCL 2, RCL 1, GSB B NOR(R2, R1): 0000 0010*

RCL 2, RCL 1, GSB C XNOR(R2, R1): 1000 0010*

RCL 2, RCL 1, GSB D R2 → R1:  1100 1110* 

* only the last eight bits 


Set word size to 64:

0 [ f ] [ STO ] (WSIZE)


5 GSB E 5! = 120

9 GSB E 9! = 362880*


* if the word size is insufficient, it will not show 362880 but a weird result as an overflow


12 GSB E   (64 word size)

12! = 4 79001600

Window 1:  4

Window 0:  79001600


20 GSB E

20! = 243 29020081 76640000

Window 2: 243

Window 1: 29020081

Window 0: 76640000


Source for the Advanced Boolean Functions:


John W. Harris and Horst Stocker.  Handbook of Mathematics and Computation Science  Springer:  New York, NY.  2006.  ISBN 978-0-387-94746-4



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. 


Retro Review and Comparison: TI-82 Advanced

 Retro Review and Comparison: TI-82 Advanced I can officially say that I have a French calculator.   Quick Facts: Models:  TI-82 Advanced Co...