Thursday, March 31, 2016

Wednesday, March 30, 2016

A Quick Look At the Casio Classpad fx-CP400

Casio Classpad fx-CP400

Price: I paid $142.99 on Amazon, some vendors charge up to $169.00
Screen: 4.8" diagonal 
Memory: 515,000 bytes
Power: 4 AAA Batteries (not rechargeable)

Maybe a little late, but I ordered the Casio Classpad fx-400.  I got warm to using stylus again after playing Super Mario Maker.  Using the stylus kind of makes me wish that I could use a stylus with the HP Prime and my iPod Touch.  



The Classpad II (fx-CP400) is an update to the Classpad 330.  The color, backlit screen is a great upgrade to the Classpad, which previously had a monochrome screen.  The characters and graphs are nice and crisp.  Like the previous Classpads, the Classpad II has CAS (computer algebra system).  

New to the Classpad II is the ability to rotate the screen horizontally and vertically.  To do so, tap the Rotate button.  The screen does not rotate automatically.  


I like the physical keyboard.  The keys are responsive the font colors on the most part, are appropriate.  Casio could have made the Shift cyan instead of navy blue.  I would not have mind the keyboard having the basic scientific functions on it (sin, cos, tan, e^x, ln, etc.).  Needless to say, you will be using the virtual keyboard a lot.  Thankfully, the virtual keyboard is bigger and much easier to use than the 330. 

The manual is divided into two parts: the main manual and a manual of examples.  After playing with the Classpad for a short time, I find the  manual of examples to be helpful.  



What impresses me about the Classpad is that you can select equations by the stylus.  You can execute algebra and CAS commands, drag them to the graph screen,  and drag them to the graph database.  The variables are universal and the Apps are seemingly integrated, at least better integrated than the other Casio graphing calculators.  Features include spreadsheets, which seems to work really well, sequence plotting, differential equation plotting, and financial calculations.  Below are some additional screen shots. 




This blog is property of Edward Shore, 2016.  





Wednesday, March 23, 2016

PrgCalcPro: One Variable Statistics

PrgCalcPro: One Variable Statistics

Instructions:

Initialize the parameters: [JUMP] 31 [RUN]
Enter the data:  X [RET] [RUN]
Analyze: [JUMP] 14 [RUN], μ on the x stack, sx on the y stack 

Registers:
1: n
2: Σx
3: Σx^2
4: Mean (μ)
5: Standard Deviation (sx)

Program:
0: 62  ;  R2
   1: 14  ;  XY // swap
   2: 10  ;  +
   3: 42  ;  M2
   4: 0F  ;  BX // last x
   5: 22  ;  X^2
   6: 63  ;  R3
   7: 10  ;  +
   8: 43  ;  M3
   9: 61  ;  R1 // determine n
  10: 01  ;  1
  11: 10  ;  +
  12: 41  ;  M1
  13: 50  ;  STOP
  14: 62  ;  R2 // calculate mean 
  15: 61  ;  R1
  16: 13  ;  /
  17: 44  ;  M4
  18: 63  ;  R3 // calculate standard deviation 
  19: 64  ;  R4
  20: 62  ;  R2
  21: 12  ;  *
  22: 11  ;  -
  23: 61  ;  R1
  24: 01  ;  1
  25: 11  ;  -
  26: 13  ;  /
  27: 21  ;  sqr // √ 
  28: 45  ;  M5
  29: 64  ;  R4
  30: 50  ;  STOP
  31: 00  ;  0 // clear variables
  32: 41  ;  M1
  33: 42  ;  M2
  34: 43  ;  M3
  35: 44  ;  M4
  36: 45  ;  M5
  37: 50  ;  STOP

Example:   Data set: {2, 3.4, 3.41, 7, 11, 23}

JUMP 31 RUN

2 RET RUN
3.4 RET RUN
3.41 RET RUN
7 RET RUN
11 RET RUN
23 RET RUN

JUMP 14 RUN

Mean = 8.301667
Std. Dev = 7.907997
N = 6
ΣX = 49.81
ΣX^2 = 726.1981


Source for formulas:   HP - 21 Applications Book: Hewlett Packard.  1975

This blog is property of Edward Shore, 2016. 

Casio fx-5800p: Barometric Formula

Casio fx-5800p: Barometric Formula

This program estimates the Barometric pressure at height H (given in meters).  This formula tends to work the best when H < 11000 m (approximately 36,089.24 feet).  

Formula:

P = P0 * e^(-g * H * M / (R * T))

Where:
P0 = static pressure, 101,325 Pa
g = Earth's Gravity, 9.80665 m/s^2
M = molar mass of air, 0.0289644 kg/mol
R = universal gas constant, about 8.31432 N*m/(mol*K)*
T = standard temperature at sea level, 288.15 K (15 °C)

The value of R varies.  The constant stored in the fx-5800p is 8.314472.  Since this program uses values from built in constants, this value is used.  

Access to the Constants:
[ FUNCTION ], 4: CONST and then:

Gas Constant R:
down, down, down, 3

Earth's Gravity:
down four times, 3

Standard atmospheric pressure, labeled atm:
down four times, 8

Program BAROMETRIC

For this text, constants are surrounded by single quotes (example: 'g')

"BEST UP TO 11000 M" ◢
"HEIGHT:"?→H
'atm' * e^( -'g' * H * 0.0289644 ÷ ( 'R' * 288.15 )) → P
"PRESSURE (PA):" ◢
P


At 11,000 m, the pressure is estimated to be 27,500.16552 Pa.  

Source:
"Barometric Formula" Wikipedia    https://en.m.wikipedia.org/wiki/Barometric_formula. Retrieved March 15, 2016


This blog is property of Edward Shore, 2016

Casio fx-5800p: Histogram

Casio fx-5800p: Histogram

The program HISTOGRAM draws a histogram for up to four data points using the Locate command.  The screen of the fx-5800p has 16 columns and 4 rows.   

When all four data points that are 15 or less, including 0, the histogram is exact.  If any data point exceeds 15, an approximate histogram is drawn as all the data points are normalized.  (Go to work with the limitations of the fx-5800p).  

Variables Used:
Data points: A, B, C, D
Normalized (if needed) data points: E, F, G, H
Sum: S = A + B + C + D



The example (shown above) shows a histogram with A = 10, B = 12, C = 13, D = 5

Program HISTOGRAM

Cls
"ENTER 4 PTS" ◢ 
"A"? → A : A → E
"B"? → B : B → F
"C"? → C: C → G
"D"? → D : D → H
A + B + C + D → S
If A > 15 Or B > 15 Or C > 15 Or D > 15
The 
Intg(E ÷ S * 15)→ E
Intg(F ÷ S * 15)→ F
Intg(G ÷ S * 15)→ G
Intg(H ÷ S * 15)→ H
IfEnd
"READY" ◢ 
Cls
For 1 → I To E
Locate I, 1, "A"
Next
For 1 → I To F
Locate I, 2, "B"
Next
For 1 → I To G
Locate I, 3, "C"
Next
For 1 → I To H
Locate I, 4, "D"
Next

This blog is property of Edward Shore, 2016 


Sunday, March 20, 2016

PrgCalcPro: Great Circle: Distance Between 2 Places on Earth in kilometers

PrgCalcPro: Great Circle: Distance Between 2 Places on Earth in kilometers

Important: Switch the calculator to Degrees mode before calculation! 

Formula:

E = acos( sin N1 sin N2 + cos N1 cos N2 cos (E1 - E2) )
Distance = 6371 * E * π / 180

Store the following values in decimal degrees:
A = N1 (longitude 1), B = E1 (latitude 1)
C = N2 (longitude 2), D = E2 (latitude 2)
Use [ K ] [ swap ] ( ° ' > to convert from H.M to Decimal degrees if needed)

Program:
   0: 6A  ;  RA
   1: 1C  ;  sin
   2: 6C  ;  RC
   3: 1C  ;  sin
   4: 12  ;  *
   5: 6A  ;  RA
   6: 1D  ;  cos
   7: 6C  ;  RC
   8: 1D  ;  cos
   9: 12  ;  *
  10: 6B  ;  RB
  11: 6D  ;  RD
  12: 11  ;  -
  13: 1D  ;  cos
  14: 12  ;  *
  15: 10  ;  +
  16: 1A  ;  acos
  17: 06  ;  6
  18: 03  ;  3
  19: 07  ;  7
  20: 01  ;  1
  21: 12  ;  *
  22: 20  ;  Pi
  23: 12  ;  *
  24: 01  ;  1
  25: 08  ;  8
  26: 00  ;  0
  27: 13  ;  /
  28: 50  ;  STOP

Example:
Los Angeles (N = 34.05°, E =-118.25°)
Moscow (N = 55.783333°, E = 37.616666°)
Approximate distance: 9,766.5757 km

This blog is property of Edward Shore, 2016. 

PrgCalcPro: Fibonacci Number

PrgCalcPro: Fibonacci Number 

F_n = F_n-1 + F_n-2 via formula ((1+√5)^n) - (1-√5)^n)/(2^n * √5)

Sequence where F0 = 0, F1= 1, F2 = 2, etc.  

Note:  PrgCalcPro, like the MK-61 calculator, has the power function x^y.  That is, x has the base and y is the exponent.   On the ProCalcPro, then the power function is executed, the exponent remains on the y stack and not "consumed".  

Example:
Y: 5
X: 2

Executing x^y leaves 
Y: 5
X: 32 (2^5)


Program:

0: 40  ;  M0
   1: 01  ;  1
   2: 0E  ;  ^ // E^
   3: 05  ;  5
   4: 21  ;  sqr // √ 
   5: 10  ;  +
   6: 24  ;  X^Y
   7: 14  ;  XY // swap
   8: 01  ;  1
   9: 0E  ;  ^ // E^
  10: 05  ;  5
  11: 21  ;  sqr // √ 
  12: 11  ;  -
  13: 24  ;  X^Y
  14: 14  ;  XY // swap
  15: 25  ;  REV // roll down
  16: 11  ;  -
  17: 60  ;  R0
  18: 02  ;  2
  19: 24  ;  X^Y
  20: 14  ;  XY // swap
  21: 25  ;  REV // roll down
  22: 05  ;  5
  23: 21  ;  sqr // √ 
  24: 12  ;  *
  25: 13  ;  /
  26: 50  ;  STOP


This blog is property of Edward Shore,  2016. 

PrgCalcPro: Third Law of Kepler

PrgCalcPro:  Third Law of Kepler: Approximate Time of Orbit in Years




Formula:   
P = √((4*π^2*a^3)/(G*(m1+m2))
P is then divided by 3.15576*10^7 (number of seconds in a Julian year)

Where G = 6.67384*10^-11 m^3/(kg*s^2)

SI units are used

Store in the following registers:
Memory 0 = mass of the sun or star (kg)
Memory 1 = mass of the planet or other astronomical object (kg)
Memory 2 = average distance or semi-major axis (m)

Program:

0: 03  ;  3
   1: 62  ;  R2
   2: 24  ;  X^Y // power function has x as the base, y the exponent
   3: 04  ;  4
   4: 12  ;  *
   5: 20  ;  Pi
   6: 22  ;  X^2
   7: 12  ;  *
   8: 60  ;  R0
   9: 61  ;  R1
  10: 10  ;  +
  11: 06  ;  6
  12: 0A  ;  .
  13: 06  ;  6
  14: 07  ;  7
  15: 03  ;  3
  16: 08  ;  8
  17: 04  ;  4
  18: 0C  ;  E // press the [EXT] key
  19: 01  ;  1
  20: 01  ;  1
  21: 0B  ;  +- // CHS
  22: 12  ;  *
  23: 13  ;  /
  24: 21  ;  sqr // √ 
  25: 03  ;  3
  26: 0A  ;  .
  27: 01  ;  1
  28: 05  ;  5
  29: 05  ;  5
  30: 07  ;  7
  31: 06  ;  6
  32: 0C  ;  E // [EXT] key
  33: 07  ;  7
  34: 13  ;  /
  35: 50  ;  STOP


Examples:

Sun, mass = 1.988435*10^30 kg
Earth, mass = 5.972190*10^24 kg
Avg Distance = 1.4959787*10^11 m (1 AU)
Period ≈ 1.000455 years

Sun, mass = 1.988435*10^30 kg
Mars, mass = 6.3902433*10^23 kg
Avg Distance = 2.2798715*10^11 m (1.524 AU)
Period ≈ 1.8814721 years 

This blog is property of Edward Shore, 2016.  



PrgCalcPro: Summation

PrgCalcPro: Summation

Summation

This program uses a loop to determine Σ f(X) from a to b.   The function f(X) starts on Line 22.  Use Memory Register a as X and finish the function with RET.   The sum is stored in Memory 0. 

The listing here uses f(X) = X^2 + 1.  

To run: enter a, press [ E up-arrow ], b, [RET], [RUN]

0: 4B  ;  MB
   1: 14  ;  XY // X<>Y
   2: 4A  ;  MA
   3: 00  ;  0 // clear memory 0
   4: 40  ;  M0
   5: 53  ;  SUB // determine f(X), loop starts here
   6: 22
   7: 60  ;  R0
   8: 10  ;  +
   9: 40  ;  M0
  10: 6A  ;  RA // add 1 to a, prepare for next loop
  11: 01  ;  1
  12: 10  ;  +
  13: 4A  ;  MA
  14: 6B  ;  RB
  15: 11  ;  -
  16: 01  ;  1
  17: 11  ;  -
  18: 59  ;  X>=0 // is a - (b+1) ≥ 0?
  19: 05 // if not repeat the loop
  20: 60  ;  R0
  21: 50  ;  STOP // terminate
  22: 6A  ;  RA // this is where f(X) starts
  23: 22  ;  X^2
  24: 01  ;  1
  25: 10  ;  +
  26: 52  ;  RET // don't forget to include RET at the end

Example:

Σ x^2 + 1 from x=0 to x=5.   Result: 61. 

This blog is property of Edward Shore,   2016.  

Programming with the PrgCalcPro iOS App




App Creator: SekApps
Price: I paid $0.99
Platform: iOS
Memory: 1,000 steps with 100 registers 

The PrgCalcPro is based on the Russian scientific calculator Elektronika MK-61.  The MK-61 was in production from 1981 to 1993.  Originally the MK-61 had 15 memory registers and 105 steps.  There are Boolean operations but no built in statistics mode.   

The PrgCalcPro and MK-61 operated by Reverse Polish Notation (RPN), like the Hewlett Packard calculators.  The calculator has 4 stacks. 

The PrgCalcPro has more English key labels instead of Russian.  You can find notes of the MK-61 here:

http://www.thimet.de/CalcCollection/Calculators/Elektronika-MK-61/CmdRef.html


Programming Notes:

M is STO, R is RCL.  There are 15 readily accessible memory registers available from the keyboard:  0-9, a, b, c, d, and e. 

Angle mode is determined by a manual switch.  Unfortunately it can't be programmed (I don't think).  

Certain symbols are used:
[x] Integer Part
{x} Fractional Part
MAX. The maximum of y and x. 
SIG.  Sign of x
Bx. Last X recall. 
lg Common logarithm (base 10, LOG)
tg Tangent function (TAN)
A small recycling symbol ([ F ], [ . ]) represents the Roll Down function. 
<--> represents the exchange function (X<>Y)
x^y: Power function where the base is on the x stack and the exponent is on the y stack.  The exponent remains of the y stack upon calculation and is not "consumed".  

This blog entry will have basic programs, and additional programs will follow on the next few blog entries.  


Eccentricity of an Ellipse
a ≥ b, b is entered first

0: 13  ;  /
   1: 22  ;  X^2
   2: 0B  ;  +/-
   3: 01  ;  1
   4: 10  ;  +
   5: 21  ;  sqr \\ √ 
   6: 50  ;  STOP


The Average of Non-Zero Numbers

Keep entering numbers using n, [RUN].  When you are done, enter 0, [RUN].  The display will show sum (memory 0), press [RUN] to get the number of points (memory 1), and finally press [RUN] to get the average.  

Notes:
The tests for the ProCalcPro (and the MK-61) work slightly differently from Hewlett Packard RPN programming calculators.  

Format:
Test ( x<0, x=0, x≥0, x≠0)
Code Number (00-99), or label
Do this next command instead of test is true 

Example:
x≠0
15
R, 0
+

If the number in the display is non-zero (test is true), then recall memory register 0 and add the number to it.  If the number is zero (test is false), skip to line 15.  

Thanks to thimet.net.  http://www.thimet.de/CalcCollection/Calculators/Elektronika-MK-61/CmdRef.html

Program:   
0: 40  ;  M0
   1: 01  ;  1
   2: 41  ;  M1
   3: 50  ;  STOP
   4: 57  ;  X!=0 \\ X≠0
   5: 15 \\ Goto line 15 if X is zero
   6: 60  ;  R0
   7: 10  ;  +
   8: 40  ;  M0
   9: 61  ;  R1
  10: 01  ;  1
  11: 10  ;  +
  12: 41  ;  M1
  13: 51  ;  JMP \\ Goto line 03 (the next code is a step code number)
  14: 03
  15: 60  ;  R0
  16: 50  ;  STOP
  17: 61  ;  R1
  18: 50  ;  STOP
  19: 13  ;  /
  20: 50  ;  STOP

Quadratic Formula

Equation: Ax^2 + Bx + C = 0
Determinant: D = B^2 - 4AC
Roots:  -B/(2A) ± √(D)/(2A)

Store A, B, and C in the a, b, and c registers respectively.  
Register a: [ . ]
Register b: [ +/- ]
Register c: [ EXT ]

Output Registers:
D = determinant
Memory 0 = root 1 if D ≥0, real part if D < 0
Memory 1 = root 2 if D ≥ 0, imaginary part if D < 0
Complex Roots Format: M0 ± i*M1

   0: 6B  ;  RB // RCL B
   1: 22  ;  X^2
   2: 04  ;  4
   3: 6A  ;  RA
   4: 12  ;  *
   5: 6C  ;  RC
   6: 12  ;  *
   7: 11  ;  -
   8: 4D  ;  MD // STO D
   9: 50  ;  STOP // determinant
  10: 59  ;  X>=0 // if X≥0 Goto line 12, else Goto line 28
  11: 28
  12: 21  ;  sqr // finding the real roots, sqr = √ 
  13: 0E  ;  ^
  14: 6B  ;  RB
  15: 11  ;  -
  16: 53  ;  SUB // execute subroutine located at line 41
  17: 41
  18: 40  ;  M0
  19: 50  ;  STOP
  20: 14  ;  XY
  21: 0B  ;  +- // CHS
  22: 6B  ;  RB
  23: 11  ;  -
  24: 53  ;  SUB
  25: 41
  26: 41  ;  M1
  27: 50  ;  STOP
  28: 31  ;  abs // complex roots
  29: 21  ;  sqr
  30: 6B  ;  RB
  31: 0B  ;  +-
  32: 53  ;  SUB
  33: 41
  34: 40  ;  M0
  35: 50  ;  STOP
  36: 14  ;  XY
  37: 53  ;  SUB
  38: 41
  39: 41  ;  M1
  40: 50  ;  STOP
  41: 6A  ;  RA // subroutine 
  42: 02  ;  2
  43: 12  ;  *
  44: 13  ;  /
  45: 52  ;  RET // return 


This blog is properly of Edward Shore.  2016. 



Thursday, March 17, 2016

Two Calculators Added to the Collection (Sharp EL-510RN and Calculated Industries Model 8510)

Two calculators which I recently added to the collection:
  
Sharp EL-510RN



Type: Scientific
Battery: Solar/Battery Backup
Cost: I paid $12.99

This is a basic scientific calculator.  Expressions are entered as-is and are evaluated by pressing the equals key. [ = ]  The calculator is small, compact, and thin, and the keyboard feels real good.  The numbers on screen are big, clear, and readable. 

Features:
* Fraction calculation and conversions
* Rectangular and polar conversions
* Three memory registers: X, Y, and M.  M+ and M- are available.
* One Variable Statistics (Mode 1)

If you want a basic, compact scientific calculator, consider getting this model. 

On a separate note, still waiting for that solar-powered RPN calculator, Hewlett Packard.  J


Calculated Industries Home ProjectCalc Model 8510



Type: Home Construction
Battery: Battery (CR 1620)
Cost: I paid $14.95

This is a simple home construction calculator that covers five specific calculations (the top row of blue keys):

* The number of gallons, quarts, or paints needed to paint a wall of a given area
* The number of rolls of wallpaper needed for a wall.
* The number of tiles needed to recover a floor, given the area of a floor.  Common measurement of tiles are used in the calculation.
* The length of rolls, of 12 feet, 13 feet, and 15 feet, of carpet to cover a floor.
* The number of bags of concrete needed.


Another plus is the ability execute calculations in yards-feet-inch and meters, probably one of my most favorite features of the Calculated Industries calculators.  We can also work with measured areas and volumes.  The π key returns the rounded value of 3.141593.  


This blog is property of Edward Shore.  2016

Thursday, March 3, 2016

Casio fx-5800p: Complex Numbers Calculations: e^z, ln z, z^w

Casio fx-5800p:  Complex Numbers Calculations: e^z, ln z, z^w


Let z = a + bi = r*e^(θi) and w = c + di = s*e^(αi) where i = √-1

The complex mode of the Casio fx-5800p, and quite frankly, most graphing calculators of Casio have limited capabilities working with complex numbers, limited to arithmetic, and powers to real numbers only.  These three programs extend that functionality. 

Use Radian mode.

Complex Exponential Function

Calculation:  e^z = e^a * e^(yi) = e^a * (cos b + i*sin b)

The input is stored in Z, output is stored in X. 

Program EXPCOMPLX
“Z”? → Z
Rad
ReP(Z) → A
ImP(Z) → B
e^(A)*(cos(B)+i*sin(B))→X

Examples: 
e^(-6i) ≈ 0.9601702867 + 0.2794154982i
e^(5.25 + 3.75i) ≈ -156.3709348 – 108.9203077i

Complex Natural Logarithm Function

Calculation: ln z = ln r + iθ

Program LNCOMPLX
“Z”? → Z
Rad
Abs(Z) → R
Arg(Z) → T
ln(R) + iT → X

Examples:
ln(3 + 6i) ≈ 1.903331245 + 1.107148718i
ln(7i) ≈ 1.945910149 – 1.570796327i

Complex Power

Calculation: z^w = e^(w ln z)

Program POWCOMPLX
“Z^(W), Z”? → Z
Rad
Abs(Z) → R
Arg(Z) → T
ln(R) + iT → X
“W”? → W
WX → X
ReP(X) → A
ImP(X) → B
e^(A)*(cos(B) + i*sin(B)) → X

Examples:
(2 + 3i)^(-1 + i) ≈ 0.09917578259 + 0.03064399883i
(0.075 – 3i)^(0.2i) ≈ 1.3295102 + 0.2970040915i


This blog is property of Edward Shore - 2016

Wednesday, March 2, 2016

HP Prime and Casio fx-5800p Approximating the Factorial Function

HP Prime and Casio fx-5800p Approximating the Factorial Function

A quick way to estimate the factorial function, which is good for all real numbers (and complex numbers with the HP Prime) is determined by Gergő Nemes Ph. D (Mathematics, University of Edinburgh):

N! ≈ N^N * √(2*π*N) * e^(1/(12*N+2/(5*N+53/(42*N)))-N)

The error is the order of 1 + O(N^-8).   Like the Sterling approximation formula, this formula is a better approximation as N increases. 

Casio fx-5800p Program:  GERGO

“GERGO RSKEY.ORG”
“N”? → N
N^(N)*√(2πN)*e^(
1÷(12N+2÷(5N+53÷
(42N)))-N)

HP Prime:  GERGO

EXPORT GERGO(N)
BEGIN
// rskey.org 2016-03-02
RETURN N^N*√(2*N*π)*
e^(1/(12*N+2/(5*N+53/(42*N)))
-N);
END;

How accurate is it?

Here a test of some random values to compare accuracy.

Values

N
N! (Determined by Wolfram Alpha)
N! approximation
1.25
1.13300309631…
1.133039736
3.08
6.64025496878…
6.640255733
5
120
120.0000005
6.64
2460.94013688180…
2460.940138
8.27
72172.53628421024…
72172.53629
11.5
1.368433654655… x 10^8
136843365.5

Source:

“Sterling’s Approximation”  Wikipedia – Page February 26, 2016 https://en.wikipedia.org/wiki/Stirling%27s_approximation#cite_note-Nemes2010-10 Retrieved March 1, 2016


Toth, Viktor T.  “The Gamma Function”  R/S Programmable Calculators  http://www.rskey.org/CMS/the-library?id=11  Retrieved March 1, 2016

Casio fx-9750GIII and fx-CG 50: Playing Games with the Probability Simulation Mode

Casio fx-9750GIII and fx-CG 50: Playing Games with the Probability Simulation Mode The Probability Simulation add-in has six type...