Monday, January 21, 2019

HP Prime: Renaming Headers in Statistic Editors

HP Prime:  Renaming Headers in Statistic Editors

I recently received an email asking for help of how to rename columns of the Statistics Editor screen.  I was not able to figure it out myself, I then asked if anyone at the Museum of HP Calculators knew. 

Link to the HPMoC thread:  http://www.hpmuseum.org/forum/thread-12231.html

Tim Wesseman replied that you can change the header name in the statistic editor by using:

D1(-1) = " [ header name in a string ] "

This applies to D2 - D9, D0, C1 - C9, and C0.  The HP Prime uses D# in anaylzing 1 Variable Statistics and C# in analyzing 2 Variable Statistics.



In the illustration listed above, I renamed the headers for both C1 and C2 as "X DATA" and "Y DATA". 

C1(-1):="X DATA"
C2(-1):="Y DATA"

Note this only changes the header in the Numeric View of the Statistics apps (Statistics 1Var, Statistics 2Var).

Caution:  This only works for Statistics columns, not for list columns for the list editor, or the matrix columns and rows for the matrix editor.

Tyann states to clear the header, simply store an empty string.  In this example,

C1(-1):=""
C2(-1):=""

Thanks to Tim Wessman, Tyann, and Roger Céspedes Esteban to sending me the email (the best for your Descriptive Statistics app, Roger).

Eddie

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

Retro Review: Casio fx-85WA


Retro Review: Casio fx-85WA

I want to give a special thank you to John Cadick. Cadick requested that I review this calculator and has loaned me his calculator to review. Much appreciated, and John, I hope you like this review.




General Information

Company: Casio
Type: Scientific – Algebraic (Perfect Algebraic Method)
Display: 10 digits with 2 digit exponents
Power: Solar with battery backup (LR44)
Memory Registers: 8: A, B, C, D, E, F, X, Y ,M
Years: Circa 1998-1999
Original Cost: $10 to $20, depending on the store (at the time)
Documentation: Manual, Quick Reference card
Two Line Display and Fractions

The Casio fx-85WA has a two line display: the top line for the mathematical expression to be evaluated, and the bottom line displays the answers. The font on the bottom line is bigger than the font on the top line. Later models will have the fonts of both lines of about equal size.

Screen for fx-85WAS (left) and FX-300MS (right)


You can enter equations as they are written, no need to worry about post-fix notation. The order of operations is effect for all calculations.

You can enter and do calculations with fractions with the [ a b/c ] key. After a calculation is completed, the [ a b/c ] can convert results between a fraction and decimal approximation. All fractions are simplified. The maximum denominator is 9999. Conversions between mixed fractions and improper fractions are also available.

The functions available are:

* Trigonometry: sine, cosine, tangent, with inverse and hyperbolic
* Logarithmic: natural and common, with inverses
* Square, square root, cube, and cube root (all primary key functions on the fx-85WA)
* Reciprocal, factorial (calculating 69! on the fx-85WS is surprising slightly faster than later models)
* Combination, permutation
* Engineering notation with the [ENG] and its inverse
* Degree-Minute-Seconds calculations [ ° ‘ “ ] and conversions
* Fractions, random numbers, round result to the FIX settings
* Polar and Rectangular Conversions

For the polar and rectangular conversions, results are stored in the following variables:

E: x, r
F: y, θ

Replay

The last expression can be edited. To re-edit the last expression, simply press either the arrow keys [ ← ] or [ → ] and edit. Characters can be inserted and deleted.

Statistics

There are two primary statistics modes on the fx-85WA:

* SD (Single Deviation, 1-variable statistics)
* REG (Regression, 2-variable statistics)

The type of regressions are:

Lin: Linear (y = a + b*x)
Log: Logarithmic (y = a + b*ln x)
Exp: Exponential (y = a + b*e^x)
Pwr: Power (y = a*x^b)
Inv: Inverse (y = a + b/x)
Quad: Quadratic (y = a + b*x + c*x^2)

Data points are entered with the [ M+ ] key with frequencies added with the semicolon ( ; ). When data is entered, the x value is returned. There is no data count indicator when [ M+ ] is pressed, I wish it did. Keep this in mind.

All the statistics registers are kept as shifted functions and alpha registers, and they are:

SHIFT 1: mean x
SHIFT 6: sy*
RCL A: ∑x^2
RCL F: ∑xy
SHIFT 2: σx
SHIFT 7: A (intercept)
RCL B: ∑x
RCL M: ∑x^3
SHIFT 3: sx*
SHIFT 8: B (slope, x coef.)
RCL C: n
RCL X: ∑x^2y
SHIFT 4: mean y
SHIFT 9: C
(x^2 coef.)
RCL D: ∑y^2
RCL Y: ∑x^4
SHIFT 5: σy
SHIFT (: r (correlation)
RCL E: ∑y



* labeled xσn-1 and yσn-1, respectively. (sample deviation)

Keyboard

The fx-85WA is a light calculator and pretty compact. The keys are pretty solid, but also allow for fast typing. I like the labeling of the keys, they are easy to read.
One thing I am big fan of both STO (store) and RCL (recall) are primary key functions. This is something we don’t see on scientific calculators anymore, as often either STO or RCL is a shifted function.

The color of the font on the keys and labels are readable with good contrast. The fx-85WA is a pleasure to use.

Verdict

The fx-85WA serves a scientific calculator providing with lots of functions. My only wish I had for this model is that top line’s font is bigger, but that is addressed in later models.

This model (and equivalent fx-300W) is a challenge to find. I searched ten pawn shops and several thrift shops for this model without success.

Before I go: I want to thank John Cadick for lending me his calculator to review.

I also want to give a table comparison of three Casio calculators:

(left to right) Casio fx-85WA, Casio fx-300MS, Casio fx-300ES Plus



Casio fx-85WA
Casio fx-300MS
Casio fx-300ES Plus
Years (approximate)
About 1998-1999
About 2000
Manual Date: 3/2011, 3/2013
About 2004
Manual Date: 11/2011
Number of Keys
50, 2 are the left and right arrow keys
46 with keypad
46 with keypad
Number of Digits
10
10
10
Contrast the Screen?
No
Yes (newer versions)
Yes
Modes
[MODE]:
COMP (Compute)
SD (1-Var Stats)
REG (2-Var Stats)


Deg/Rad/Grad


Fix/Sci/Norm
[MODE]:
Comp (Compute)
SD (1-Var Stats)
REG (2-Var Stats)


Deg/Rad/Grad


Fix/Sci/Norm


Disp (ab/c, d/c, Dot, Comma)


Contrast (newer versions)
[MODE]:
Comp (Compute)
Stat (Statistics)
Table (f(x), g(x))


[SETUP]:
MathIO/LinearIO
Deg/Rad/Grad
Fix/Sci/Norm
ab/c vs. d/c
STAT (frequencies on)
TABLE (f or f an g)
Recurring Decimal
Display (comma/decimal point)
Contrast
Statistics Regressions
Linear, Logarithmic, Exponential, Power, Inverse, Quadratic
Linear, Logarithmic, Exponential, Power, Inverse, Quadratic
Linear, Quadratic, Logarithmic, Exponential, Power (both a*b^x and a*x^b), Inverse
Display
2-line display, top: entry, bottom: result
2-line display, top: entry, bottom: result
Textbook (can be set to 2-line display)
Exact Answers
Fractions
Fractions
Fractions, Square Root, Pi
Statistical Registers
Keyboard and Registers:
A: ∑x^2, B: ∑x
C: n, D: ∑y^2
E: ∑y, F: ∑xy,
M: ∑x^3, X: ∑x^2y
Y: ∑x^4
In two menus: S-SUM, S-VAR
In a menu: STAT
Statistical Data Entry
With the [M+] button, use semicolon (;) to input frequency
With the [M+] button, use semicolon (;) to input frequency
In a table, frequency column can be turned on or off in the SETUP menu
Multi-statement operations
No
Yes (with [ : ] )
Yes (with [ : ] )
Rect to Polar Conversions
E = r, F = θ
E = r, F = θ
X = r, Y = θ
Answer is displayed
Polar to Rect Conversions
E = x, F = y
E = x, F = y
X = x, Y = y
Answer is displayed
Extras
N/A
N/A
GCD, LMC, Int, Intg, RandInt, Factoring Integers (FACTOR)
Power
Solar/Batter Backup: LR44
Solar/Battery Backup: LR44
Solar/Battery Backup: LR44


Eddie

All original content copyright, © 2011-2019. 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. Please contact the author if you have questions.

Wednesday, January 16, 2019

Comparison – Three Generations of Casio fx-115





Casio fx-115D



Casio fx-115MS




Casio fx-115ES Plus






Casio fx-115D
Casio fx-115MS
Casio fx-115ES Plus
Years (approximate)
1995
2000s
About 2008
Number of Keys
44
50 with keypad
50 with keypad
Number of Digits
10
10
10
Contrast the Screen?
No
Yes
Yes
Modes
[MODE]:
Engineering
Complex Numbers
SD (1-Var Stats)
LR (Linear Regression)
DEG/RAD/GRAD
FIX/SCI/NORM

[MODE]:
Comp (Compute)
SD (1-Var Stats)
REG (2-Var Stats)
Deg/Rad/Grad
Fix/Sci/Norm
Disp (ab/c, d/c, Dot, Comma)
Contrast
EQN:
2 x 2 linear system, 3 x 3 linear system, quadratic polynomial, cubic polynomial
[MODE]:
Comp (Compute)
Complex (complex numbers)
Stat (Statistics)
Base
Table (f(x), g(x))
Equation: 2 x 2 linear system , 3 x 3 linear system, quadratic polynomial, cubic polynomial
Vector
Verify (comparison tests)

[SETUP]:
MathIO/LinearIO
Deg/Rad/Grad
Fix/Sci/Norm
ab/c vs. d/c
STAT (frequencies on)
TABLE (f or f an g)
Recurring Decimal
Display (comma/decimal point)
Contrast
Statistics Regressions
Linear
Linear, Logarithmic, Exponential, Power, Inverse, Quadratic
Linear, Quadratic, Logarithmic, Exponential, Power (both a*b^x and a*x^b), Inverse
Display
One line: classic post-fix notation
2-line display, top: entry, bottom: result
Textbook (can be set to 2-line display)
Exact Answers
Fractions (when they are used)
Fractions
Fractions, Square Root, Pi
Statistical Registers
On the keyboard
In two menus: S-SUM, S-VAR
In a menu: STAT
Statistical Data Entry
With the [M+] button
With the [M+] button
In a table
Multi-statement operations
N/A
Yes (with [ : ] )
Yes (with [ : ] )
Rect to Polar Conversions
View only (exchange answers with X ←→ Y)
E = r, F = θ
X = r, Y = θ
Answer is displayed
Polar to Rect Conversions
View only (exchange answers with X ←→ Y)
E = x, F = y
X = x, Y = y
Answer is displayed
Calculus Functions
None
Integral, Derivative, Solve for X
Integral, Derivative, Solve for X, Sum, Product
Variables
M, Kin/Kout 1-6
A,B,C,D,E,F,X,Y,M
A,B,C,D,E,F,X,Y,M
Extras
Engineering Symbols
Engineering Symbols
GCD, LMC, Int, Intg, RandInt, Factoring Integers (FACTOR)
Power
Solar/Battery Backup: G927
Solar/Battery Backup: LR44
Solar/Battery Backup: LR44


Eddie

All original content copyright, © 2011-2019. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


Sunday, January 13, 2019

HP Prime, TI-84 Plus, and Casio fx-CG 50: Julian Date/Gregorian Calendar Conversions

HP Prime, TI-84 Plus, and Casio fx-CG 50:  Julian Date/Gregorian Calendar Conversions

Introduction

One conversion that is common in astronomy is to convert dates from our Gregorian calendar (the most commonly used day-to-day calendar) to a Julian Date Number, and visa versa.

JD:  Convert Gregorian Date to Julian Date Number

GREG:  Convert Julian Date Number to Gregorian Date

The Julian date number of 2451545 corresponds to January 1, 2000.

Gregorian Date to Julian Date Number

HP Prime Program JD:  Gregorian Date to Julian Date Number
Arguments:  four digit year, month, day
JD(y,m,d)

EXPORT JD(y,m,d)
BEGIN
// Gregorian to Julian
// year, month, day
// 2019-01-12 EWS
//  Wikipedia
LOCAL x0:=IP((m-14)/12);
LOCAL x1:=IP(((1461*(y+4800+x0))/4));
LOCAL x3:=IP(367*(m-2-12*x0)/12);
LOCAL x5:=IP((y+4900+x0)/100);
LOCAL x6:=IP(3*x5/4);
LOCAL j:=x1+x3-x6+d-32075;
RETURN j;
END;

TI-84 Plus Program JD:  Gregorian Date to Julian Date Number

"GREGORIAN TO JULIAN"
"2019-01-13 EWS"
Input "YEAR: ",Y
Input "MONTH: ",M
Input "DAY: ",D
iPart((M-14)/12)→X
iPart(((1461*(Y+4800+X))/4))→A
iPart(367*(M-2-12*X)/12)→B
iPart((Y+4900+X)/100)→C
iPart(3*C/4)→C
A+B-C+D-32075→J
Disp "JD: ",J

Casio fx-CG50 Program JD:  Gregorian Date to Julian Date Number
This version can be typed in directly in the calculator (not a text file)

"GREGORIAN TO JULIAN"
"2019-01-19 EWS"
"YEAR?"→Y
"MONTH"?→M
"DAY"?→D
Int ((M-14)÷12)→X
Int (((1461×(Y+4800+X))÷4)) →A
Int (367×(M-2-12×X)÷12) →B
Int ((Y+4900+X) ÷ 100) →C
Int (3×C÷4)→C
A+B-C+D-32075→J
ClrText
Locate 1,1,"JD"
Locate 1,2,J

Julian Date Number to Gregorian Date

HP Prime Program GREG:  Julian Date Number to Gregorian Date
Argument:  Julian Date Number
GREG(j)

EXPORT GREG(j)
BEGIN
// Julian to Gregorian
// Wikipedia
// 2019-01-12 EWS
LOCAL x1:=IP((4*j+274277)/146097);
LOCAL x2:=IP(x1*3/4);
LOCAL f:=j+1401+x2-38;
LOCAL E:=4*f+3;
LOCAL G:=IP((E MOD 1461)/4);
LOCAL H:=5*G+2;
LOCAL D:=IP((H MOD 153)/5)+1;
LOCAL M:=((IP(H/153)+2) MOD 12)+1;
LOCAL Y:=IP(E/1461)-4716+IP((12+2-M)/12);
RETURN {Y,M,D};
END;

TI-84 Plus Program GREG:  Julian Date Number to Gregorian Date

"JULIAN TO GREGORIAN"
"2019-01-13 EWS"
Input "JD: ",J
iPart((4*J+274277)/146097)→X
iPart(X*3/4)→X
4*(J+1401+X-38)+3→E
5*iPart(remainder(E,1461)/4)+2→H
iPart(remainder(H,153)/5)+1→D
remainder(iPart(H/153)+2,12)+1→M
iPart(E/1461)-4716+iPart((12+2-M)/12)→Y
Disp "YEAR, MONTH, DAY:",Y,M,D

Casio fx-CG50 Program GREG: Julian Date Number to Gregorian Date 
This version can be typed in directly in the calculator (not a text file)

"JULIAN TO GREGORIAN"
"2019-01-13 EWS"
"JD"?→J
Int ((4 ×J+274277) ÷146097) →X
Int (X ×3 ÷4) →X
4 ×(J+1401+X-38)+3 → E
5 × Int( MOD(E,1461) ÷ 4)+2 → H
MOD(Int  (H ÷153)+2,12)+1 →M
Int (E ÷1461) -4716+Int ((12+2-M) ÷12) → Y
ClrText
Locate 1,1,"YEAR, MONTH, DAY"
Locate 1,2,Y
Locate 1,3,M
Locate 1,4,D

Examples

Gregorian Date:  1988, October 31
JD:  2447466

Gregorian Date:  1999, January 11
JD:  2451190

Gregorian Date:  2017, March 21
JD:  2457834


Source:

"Julian Day"  Wikipedia.  Edited (when retrieved) November 19, 2018.  Retrieved January 11, 2019.  https://en.wikipedia.org/wiki/Julian_day

Eddie

All original content copyright, © 2011-2019.  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.  Please contact the author if you have questions.

TI-84 Plus CE: Lower Case Letters without Assembly

TI-84 Plus CE:  Lower Case Letters without Assembly

Letter Case Letters without Assembly Programs

It is possible to put letter case letters in TI-84 Plus CE programs without running an assembly program.  This is going to require the use of the TI Connect CE computer program.  I am using the Windows version and hopefully my assumption will be correct that this technique will work on the Mac version as well.

Note: You will need the TI-84 Plus CE (the newest, thinnest TI-84) for this.  The TI-84 Plus CE has a back-lit, color screen. 

Steps:

1.  Connect your TI-84 Plus CE to your computer.

2.  Start up the TI Connect CE computer program.

3.  Select PROGRAM EDITOR on the left hand menu.  Next, click on New Program (the folder with the plus key) on the right.  (You can also edit programs but we'll create a new program for this demo.)

4.  Name your program.  For this example, I am going to name it DEMO.  The name can be in lower case, but the letters in the name will become upper case when the program is transferred to the TI-84 Plus CE. 

5.  Type your program.  You can use the catalog on the left to insert commands.  The Keypad section is where you insert pi (π), the store arrow (→), the square root function (√), the exponential function (e^), and the imaginary indicator to build complex numbers (i = √-1). 

We will need to type the program in the Program Editor software, not directly on the TI-84 Plus CE calculator. 

This is my demo program.

TI-84 PLUS CE Program DEMO

Disp "This is a test program."
Input "a: ",A
Input "b: ",B
A^2+B^2→C
A^3+B^3→D
ClrHome
Disp "Results:","a^2+b^2=",C
Disp "a^3+b^3=",D

Notes:

*  Variables must still be in uppercase. 

*  You can use lower case letters with programming through the software, but Unicode characters do not transfer over. 

6.  Save your program (if you want). 

7.  If you have not already, turn on the TI-84 Plus CE.  Then send the program to your TI-84 Plus CE.  There are three ways to accomplish this task (Windows):

* Click on the Send Program to Connect Calculator icon.
* Key Ctrl+E.
* Under the Actions menu, click on the Send to Calculators menu.

If the program is accepted, you program is transferred.

8.  Run the program on your calculator.



Limitations

*  Using lower case in this method requires editing on the program software, not the calculator itself.

*  You must still use single upper case letters for variables.

*  I have not been able to do Unicode characters with this method, as the calculator program will not transfer.

*  This lower case is useful for displaying messages and prompts. 

Eddie

All original content copyright, © 2011-2019.  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.  Please contact the author if you have questions.

Thursday, January 10, 2019

HP 42S Polynomial Operations

HP 42S Polynomial Operations

Note: These programs presented in today's blog are can also be programmed on the Free42 app and the DM 42.  The default setting, 25 memory registers, is assumed to be set.  The programs are written use R24 as a counter. 

This program uses indirect storage (R24).  The maximum order is 23.

HP 42S Program SPOLY

This program asks for the order of a polynomial and then asks the user to store the coefficients.  The order of registers are coefficients of powers of x in descending order from n to 0. 

For example, for a cubic polynomial, the coefficients are stored as such:
R01 = coefficient of x^3
R02 = coefficient of x^2
R03 = coefficient of x
R04 = constant coefficient

Program:

00 { 67-Byte Prgm }
01▸LBL "SPOLY"
02 CLX
03 "ORDER?"
04 PROMPT
05 STO 00
06 IP
07 1
08 +
09 1ᴇ-3
10 ×
11 1
12 +
13 STO 24
14▸LBL 00
15 "X↑"
16 RCL 00
17 RCL 24
18 IP
19 -
20 1
21 +
22 ARCL ST X
23 ├" ="
24 CLX
25 PROMPT
26 STO IND 24
27 ISG 24
28 GTO 00
29 "DONE"
30 AVIEW
31 RTN
32 END

Example:  Store the polynomial p(x) = 2*x^3 - x^2 + 5*x + 7

Keystrokes:  [ XEQ ] (SPOLY)
"ORDER?" 3 [ R/S ]
"X↑3.0000=" 2 [R/S]
"X↑2.0000=" 1 [ +/- ] [R/S]
"X↑1.0000=" 5 [R/S]
"X↑0.0000=" 7  [R/S]
"DONE"

Results
R01 = 2.0000
R02 = -1.0000
R03 = 5.0000
R04 = 7.0000

HP 42S Program HORNER

The HORNER evaluates the polynomial p(x).  The assumes that the order of registers are coefficients of powers of x in descending order from n to 0.  The user is asked about the order of the polynomial and the value of x.

Program:

00 { 65-Byte Prgm }
01▸LBL "HORNER"
02 CLX
03 "X?"
04 PROMPT
05 STO 00
06 CLX
07 "ORDER?"
08 PROMPT
09 IP
10 1ᴇ-3
11 ×
12 1
13 +
14 STO 24
15 RCL 00
16 RCL× IND 24
17 ISG 24
18▸LBL 01
19 RCL+ IND 24
20 RCL× 00
21 ISG 24
22 GTO 01
23 RCL+ IND 24
24 "P(X)="
25 AVIEW
26 RTN
27 .END.

Example:  Let p(x) be the polynomial, p(x) = 2*x^3 - x^2 + 5*x + 7
Calculate p(-3).

The coefficients are have already been stored (from last example).
R01 = 2.0000
R02 = -1.0000
R03 = 5.0000
R04 = 7.0000

Keystrokes:  [XEQ] (HORN)
"X?" 3 [ +/- ] [ R/S ]
"ORDER?" 3  [ R/S ]

Result:  -71.0000

HP 42S Program DX_PX

This program calculates coefficients of the derivative of the polynomial p(x), using the form:

d/dx x^n = n * x^(n-1)

The order of registers are coefficients of powers of x in descending order from n to 0. 

Program:

00 { 79-Byte Prgm }
01▸LBL "DX_PX"
02 CLX
03 "ORDER?"
04 PROMPT
05 STO 00
06 IP
07 1ᴇ-3
08 ×
09 1
10 +
11 STO 24
12▸LBL 02
13 RCL IND 24
14 RCL 00
15 RCL 24
16 IP
17 -
18 1
19 +
20 ×
21 STO IND 24
22 "X↑"
23 RCL 00
24 RCL 24
25 IP
26 -
27 ARCL ST X
28 X<>Y
29 AVIEW
30 STOP
31 ISG 24
32 GTO 02
33 1
34 RCL+ 00
35 STO 24
36 CLX
37 STO IND 24
38 "DONE"
39 AVIEW
40 RTN
41 .END.

Example:  Calculate the derivative of p(x) = 2*x^3 - x^2 + 5*x + 7.  Assume that coefficients from the previous example.

Keystrokes:  [ XEQ ] (DX_PX)
"ORDER?" 3 [R/S]

Results:
"X↑2.0000=" 6.0000 [R/S]
"X↑1.0000=" -2.0000 [R/S]
"X↑0.0000=" 5.0000  [R/S]
"DONE"

dp/dx = 6*x^2 - 2*x + 5

Registers:
R1 = 6.0000
R2 = -2.0000
R3 = 5.0000
R4 = 0.0000

Eddie

All original content copyright, © 2011-2019.  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.  Please contact the author if you have questions.

HP Prime: Renaming Headers in Statistic Editors

HP Prime:  Renaming Headers in Statistic Editors I recently received an email asking for help of how to rename columns of the Statistics ...