## Saturday, January 28, 2023

### TI-30 XIIS and Casio fx-115ES Plus 2nd Edition: The Percent Function

TI-30 XIIS and Casio fx-115ES Plus 2nd Edition:  The Percent Function

%:  Divide by 100

Unlike computer languages, where the % symbol usually means modulo division, the % divides the argument by 100 on calculators such as the TI-30 XIIS and Casio fx-115 ES Plus 2nd Edition.

Hence 50% returns 0.5

This may provide confusion when the following is typed:

100 + 50%

which would returns 100.5 instead of the expected 150.

Here is how to use the percent function to our advantage in common situations.

x + p% and x - p%

1.  Enter x and store it in a variable, preferably A.   The variable A can be advantageous, especially the TI-30 XIIS.   Access the variable A on the TI-30 XIIS by pressing [MEMVAR] [ = ] with every few keystrokes.

2.  Enter the following:

Subtract percent:  A-A×p%

We can omit the multiplication sign on the TI-30 XIIS.  The multiplication sign is required on the fx-115ES Plus.

Examples:

50 + 10%:   50 → A;  A+A*10%  returns 55

50 - 10%:  50 → A;  A-A*10% returns 45

Percent Change

Key strokes:  (new - old)/old%

Example:

Find the percent change from 425 to 480:

(480-425)/425%   returns 12.94117647

Financial Calculations

For the following calculations, let i=6% and n=4  (i being the periodic interest, n being number of payments).  We can see the percent function in action.

Future Value of a Present Value:  (1+i%)^n

(1+6%)^4 returns 1.26247696

Future Annuity Value Factor:  ((1+i%)^n-1)/i%

((1+6%)^4-1)/6% returns 4.374616

Present Annuity Value Factor:  (1-(1+i%)^-n)/i%

(1-(1+6%)^-4)/6% returns 3.465105613

Hope this helps, so we can find additional calculations where this percent function can help with calculations with the TI 30 XIIS and Casio fx-115 ES Plus 2nd Edition.

Eddie

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

### Casio fx-9750GIII: Spin the Wheel

Casio fx-9750GIII:   Spin the Wheel

Making the Wheel and String Commands

The wheel is comprised of a long string.  Each space has an equal amount of characters, in this case I picked 5.  To make the wheel "spin", I use the StrRotate.

StrRotate(Str n, s):

Str n:  n from 1 to 20

s:  number of spaces to rotate the string.  If s>0 the string rotates left.  If s<0, the string rotates right.   The characters wrap around.

Other commands used:

StrLeft(Str n, s):   takes the left s characters of Str n

StrRight(Str n, s):  takes the right s characters of Str n

StrMid(Str n, p, m):  extracts the string starting at position n at m characters

The wheel used in this program:

BROKE  (it's bankrupt said in five characters)

\$ 650

\$ 550

\$ 900

\$ 800

\$ 700

PRIZE  (prize space)

\$1000

\$ 600

\$ 750

\$ 500

\$5000

5 characters per space is used.

Casio fx-9750GIII Program:  SPIN

"2022-11-23 EWS"

"BROKE\$ 650\$ 550\$ 900\$ 800\$ 700PRIZE\$1000\$ 600\$ 750\$ 500\$5000"→Str 1

Lbl 1

RanInt#(20,48)→N

For 1→I To N

StrRotate(Str 1,5)→Str 1

StrLeft(Str 1,5)→Str 2

ClrText

Locate 10,3,"↓"

Locate 2,4,StrRight(Str 1,5)

Locate 8,4,Str 2

Locate 14,4,StrMid(Str 1,6,5)

Next

Lbl 0

ClrText

Locate 4,4,"THANK YOU"

↓ and \$ are found in the CHAR menu.

Have fun,

Eddie

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

### Retro Review: Hewlett Packard HP 14B 50th Anniversary Edition

Retro Review:  Hewlett Packard HP 14B 50th Anniversary Edition

Quick Facts

Model:  HP 14B 50th Anniversary Edition

Company:  Hewlett Packard

Years:  1989 (and probably 1990)

Type:  Finance

Batteries: 3 x LR44, SR44, AR76

Display:  1 line, alpha-numeric, 12 characters

Original Price:  \$50, originally available only to Hewlett Packard's shareholders and employees

Operating System:  Chain

Features

*  Time Value of Money with Amortization.  Like all the HP financial calculators, the compute key is not used to calculate values.   The interest register is based on annual interest, while payments per year (P/YR) is a setting.  Beginning and ending of period payment modes are present.

*  Cash Flows:  NPV and IRR.  These worksheets store the cash flow and make use the COMPUTE function to calculate NPV and IRR.  NPV is stored in PV while IRR is stored in I%YR.

*  Solvers:  Cost/Price/Margin, Old/New/% Change, Nominal Rate vs. Effective

Rate, Total/Part/% of the Total

*  Schedules:  ROI% (return on investment), Breakeven, and Inventory with Turnover analysis.   The schedules will make use of the down arrow key [ ↓ ], up arrow [ shift ] ( ↑ ), and the COMPUTE function [ shift ] (COMPUTE).

*  Statistics:  One variable and two-variable.  Regressions included are:

Linear:  y = m * x + b

Exponential:  y = b * e^(m * x)

Logarithmic:  y = b + m * ln x

Power:  y = b * x^m

There is also a Best fit mode, which decides the regression model based on the best correlation between the four modes.

There are also two prediction sets  Going through the STAT menu, you can predict x and y values based on the chosen model.  Going through the FRCST (forecast) menu, the regression used is determined by the regression with the best correlation.

The Math menu contains three functions:  e^x, ln, and n!  (factorials for positive integers only).

The 14B operates in chain mode, meaning no order of operations is followed.  The 14B operates similar to a four-function calculator in this regard.

I think the 14B is set to be an intermediate finance calculator between the 10B and the 17B, which the 17B allows for user equations.

The display will not only give just numbers but will also label the variables, which I always find useful.

Golden Anniversary

The HP 14B 50th Anniversary Edition has a gold circle with a 50 logo on the top right side of the calculator.  Also on the engravement is the years 1939 - 1989.  On the leather holder, there is also the 50/1939 - 1989 logo engraved into the leather case.

The HP 14B 50th Anniversary edition is the same of the "normal" HP 14B calculator in terms of features and excellent keyboard.

The HP 14B is part of Hewlett Packard's pioneer series, which the series includes the HP 20S, 21S, 22S, 27S, 42S, 17B, 17BII, 10B, 32S, 32SII, and 32S 50th Anniversary Edition.  It is my favorite series of Hewlett Packard calculators, both in terms of the features the calculators have and the high quality keyboards the calculators have.

50th edition calculators are available through online auction sites such as eBay for a reasonable price.  Perhaps I may add a 32S 50th Anniversary Edition to my collection.

Sources:

"HP 14-B 50th Anniversary Limited Edition"   Museum of HP Calculators

https://www.hpmuseum.org/hp14b50.htm   Retrieved January 11, 2023

HP 14B Business Calculator Owner's Manual.  Hewlett Packard

Eddie

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

### Swiss Micros DM41X: Infinite Integrals by Gaussian Quadrature

Swiss Micros DM41X:   Infinite Integrals by Gaussian Quadrature

Introduction

The program INFGAUS calculates the integral:

∫ e^-x * f(x) dx from x = a to x = ∞

f(x) is the subroutine FX.   The subroutine starts with the x value on the stack and ends with the RTN command.

The HP 45 algorithm, which is incorporated into the program INFGAUS estimates the integral by the sum

e^-a * Î£(( w_i * f(z_i + a)) for i=1 to 3)

where

w_1 = 0.71109390099

z_1 = 0.4157745568

w_2 = 0.2785177336

z_2 = 2.29428036

w_3 = 0.0103892565

z_3 = 6.289945083

DM41X Program:  INFGAUS

The code can work is for the entire HP 41C/DM41 family.  The calculator is set to Fix 2 mode.  Registers 01 through 08 are needed.

01  LBL^T INFGAUS

02  .4157745568

03  STO 01

04  2.29428036

05  STO 02

06  6.289945083

07  STO 03

08  .7110930099

09  STO 04

10  .278517736

11  STO 05

12  .0103892565

13  STO 06

14  FIX 2

15  ^T A?

16  PROMPT

17  STO 07

18  RCL 01

19  +

20  XEQ^T FX

21  RCL 04

22  *

23  STO 08

24  RCL 07

25  RCL 02

26  +

27  XEQ^T FX

28  RCL 05

29  *

30  ST+ 08

31  RCL 03

32  RCL 07

33  +

34  XEQ^T FX

35  RCL 06

36  *

37  RCL 08

38  +

39  RCL 07

40  CHS

41  E↑X

42  *

43  STO 08

44  END

Examples

Example 1

∫ e^-x * x^3.99 dx from x = 0 to ∞   (calculate Î“(4.99))

LBL^T FX

3.99

Y↑X

RTN

A? 0

Result:  23.64

Example 2

∫ e^-x * x^2 ÷ (x - 1)  dx from x = 2 to ∞

LBL^T FX

X↑2

LASTx

1

-

/

RTN

A?  2

Result:  0.62

Example 3

∫ (e^-x)^2 dx from x = 0 to ∞

= ∫ (e^-x) * (e^-x) dx from x = 0 to ∞

LBL^T FX

CHS

E↑X

RTN

A?  0

Result:  0.50  (it turns out 0.5 is the exact answer)

Source

HP-45 Applications Handbook  Hewlett Packard Company.  1974.

Remember, my regular posting schedule for January and February 2023 is on Saturdays only.

Eddie

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

### Casio fx-9750GIII: Decimal Expansion of a Fraction

Casio fx-9750GIII:  Decimal Expansion of a Fraction

Introduction - Happy New Year!

The program DEC21 finds a decimal expansion of a positive fraction.  This program is based on Barry Kissane's DECIMAL program from "Programming Your Calculator: Casio fx-7400G Plus" (see source below).

Casio fx-9750GIII Program:  DEC21

244 bytes

"2022-11-22 EWS"

"FRACTION EXPANSION"

"NUM.(>0) "?→N

"DEN.(>0) "?→X

Int log (N/X)+1→T

ClrText

Locate 1,2,N

Locate 13,2,"÷"

Locate 1,3,X

Locate 13,3,"≈"

For 1→I To 21

If T=0

Then

Locate I,5,"."

I+1→I

IfEnd

Int (N÷X)→D

10*(N-D×X)→N

Locate I,5,D

T-1→T

Next

Locate 18,1,"   "

Note:  the approximate symbol, ≈, is found in the CHAR menu.

Examples:

Example 1:

558/127

NUM:  558

DEN:  127

Result:

558 ÷

127 ≈

4.3937007874015748031

Example 2:

5/27

NUM: 5

DEN: 27

5  ÷

27  ≈

0.1851851851851851851

Here's to a great 2023!

Source

Kissane, Barry.  Programming Your Calculator: Casio fx-7400G Plus. Chatswood NSW, Australia, 2000. ISBN 0 9758302 0 3.

Eddie

Remember, my regular posting schedule for January and February 2023 is on Saturdays only.

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

### HP Prime CAS: Riemann-Louiville Integral vs Taking the Indefinite Integral Twice

HP Prime CAS: Riemann-Louiville Integral vs Taking the Indefinite Integral Twice Introduction The Riemann-Louiville Integral take...