Sunday, February 22, 2015
HP Prime and TI-84+: RLC Series Circuit and Impedance
Thursday, February 19, 2015
HP Prime & TI-84+: Equation of Time (One Way of Calculating It)
![]() |
| Equation of Time (HP Prime) |
Wednesday, February 18, 2015
HP Prime & TI-84+: Thermal Noise (Johnson-Nyquist Noise)
The following program calculates the RMS (root-mean-square) voltage of a resistor at a certain temperature. Thermal noise, also known as Johnson-Nyquist Noise is generated when the resistor has a temperature above absolute zero. The equation to calculate the voltage is:
Friday, February 13, 2015
Heart Curve: Happy Valentines Day!
![]() |
| A Heart Curve on HP Prime |
Wednesday, February 11, 2015
HP Prime, HP 42S, HP 12C: Julian Date
M = month
D = day
Y = year, four digits
UT = Universal Time. The universal time is notated by 0:00 to 24:00, as the current time at the Greenwich Mean Time. Depending on where you live, it may be necessary to adjust the current time in your time zone to get Greenwich Mean Time. For example, add 8 hours to the Pacific Standard Time, and add 7 hours to the Pacific Daylight Savings time, to get the equivalent Greenwich Mean Time for the Pacific Time Zone. You may have to adjust the day number by 1 (either way) as a consequence.
Formula for the Julian Date:
j:=367*Y-IP(7*(Y+IP((M+9)/12))/4)
-IP(3*(IP((Y+(M-9)/7)/100)+1)/4)
+IP(275*M/9)+D+1721028.5+H/24
where IP is the integer function. The integer function is also symbolized by INT, INTG, and iPart. This is the most complete formula, as there are shortcut formulas for Julian Date.
Source for formula: http://scienceworld.wolfram.com/astronomy/JulianDate.html
Here are the programs for Julian Date for three different HP calculators: HP Prime, HP 42S, and HP 12C.
My thanks to Jason Foose who traded with me, I now have a 42S. He asked to trade me for my one of my 50g's.
Julian Date: HP Prime
EXPORT JULIAN(M,D,Y,H)
BEGIN
// wolfram.com
// 2015-02-08
// H UT time
// +8 PST +7 PDT
LOCAL j;
j:=367*Y-IP(7*(Y+IP((M+9)/12))/4)
-IP(3*(IP((Y+(M-9)/7)/100)+1)/4)
+IP(275*M/9)+D+1721028.5+H/24;
RETURN j;
END;
Julian Date: HP 42S
Before running the program "JD", store the following:
Month (M) to Memory 01
Day (D) to Memory 02
Year (Y) to Memory 03
Universal Time (H) to Memory 04
The Julian Date is stored in Memory 00.
(edited 2/13/2015 - thanks Mike)
00 { 102-Byte Prgm }
01 LBL "JD"
02 367
03 RCLx 03
04 STO 00
05 9
06 RCL+ 01
07 12
08 ÷
09 IP
10 RCL+ 03
11 7
12 x
13 4
14 ÷
16 STO- 00
17 -9
18 RCL+ 01
19 7
20 ÷
22 100
23 ÷
25 1
26 +
27 0.75
28 x
29 IP
30 STO- 00
31 275
32 RCLx 01
33 9
34 ÷
36 STO+ 00
37 RCL 00
38 RCL+ 02
39 1721028.5
40 +
41 RCL 04
42 24
43 ÷
44 +
45 STO 00
46 RCL 00
47 .END.
Examples:
January 7, 2015; 12:35 UT
M = 1, D = 7, Y = 2015, H = 12.58333333
Result: JD = 2,457,030.02431
December 17, 2230; 18:30 UT
M = 12, D = 17, Y = 2230, H = 18.5
Result: JD = 2,535,901.27083
Julian Date: HP 12C
This program uses the ΔDYS function. Universal time is assumed to be 12:00.
Step Key Key Code
01 1 1
02 . 48
03 0 0
04 1 1
05 2 2
06 x<>y 34
07 ΔDYS 43 26
08 2 2
09 4 4
10 5 5
11 1 1
12 5 5
13 4 4
14 5 5
15 + 40
Examples:
June 30, 2016; JD = 2,457,570
October 31, 2111: JD = 2,492,390
Hopefully this program will be helpful. Until next time,
Eddie
This blog is property of Edward Shore. 2015
Wednesday, February 4, 2015
Simple Polar Curves
** Updated 2/11/2015 - Thank you Mike for pointing out my mistake on the rose curve - it is much appreciated! Eddie
Here are some of the basic curves in polar coordinates. These are graphed using the HP Prime Emulator, where 0 ≤ θ ≤ 4*π.
Rose: r = cos(n*θ)
If n is odd, then the rose has n pedals.
If n is even, then the rose has 2*n pedals.
r = cos(5*θ)
![]() |
| r = cos(5*θ) |
r = cos(6*θ)
![]() |
| r = cos(6*θ) |
Leminscate: r = +/- sqrt(a^2 * cos (2*θ))
r = +/- sqrt(9 * cos (2*θ))
![]() |
| R1 = sqrt(9 * cos (2*θ)),R2 = -R1 |
Cardiod: r = 2*a*(1 + cos θ)
r = 8 * (1 + cos θ)
![]() |
| r = 8 * (1 + cos θ) |
Limacon of a Pascal: r = b + a*cos θ
r = 6 - 7*cos θ
![]() |
| r = 6 - 7*cos θ |
And the most basic polar curve of them all:
Spiral of Archidemeds: r = a * θ
r = 3 * θ
![]() |
| r = 3 * θ |
Source:
Murray R. Spiegel, Ph.D., Seymour Lipschutz, Ph.D., John Liu, Ph.D. "Schuam's Outlines: Mathematicals Handbook of Formulas and Tables." 3rd Edition. 2009.
This blog is property of Edward Shore. 2015
HP Prime: Pixel Art (Pixel Noise)
k = f(x,y) MOD 318
j = g(x,y) MOD 218
where pixel coordinate (k,j) gets plotted. I would like to share some results. If you are interested, I list all the programs involved with each picture at the end of this blog. Here is the general format:
// General Format
EXPORT PIX09()
BEGIN
LOCAL x,y,j,k,n,l,s;
// set background color
RECT_P(#0h);
// add a counter if necessary
n:=0;
// list colors (if you want more than one colored pixel - optional)
l:={#FF0000h,#87CEEBh,#FFFF00h,#FF00h};
// main loop
FOR x FROM 1 TO 318 DO
FOR y FROM 1 TO 218 DO
// next two lines needed if l is defined
n:=n+1;
s:=1+n MOD 4;
// k and j represent functions of x and y - they really can be anything
// The MOD 318 and MOD 218 commands are needed to keep the pixels inbound
k:=IP((x^2*y)^3+(x*y^2)^3) MOD 318;
j:=IP(e^(x)+e^(y)) MOD 218;
// draw a pixel
PIXON_P(k,j,l(s));
END;
END;
// this just tells the user "I'm done"
TEXTOUT_P("DONE",0,219,3,#FFFFFFh);
FREEZE;
END;
Enjoy and try this if you want.
Eddie
PIX05: This looks like mist.
![]() |
| PIX05 |
![]() |
| PIX09 |
PIX10:
![]() |
| PIX10 |
PIX11:
![]() |
| PIX11 |
PIX12: Could this be a view of a forest or jungle from a helicopter?
![]() |
| PIX12 |
PIX14: This looks like a fabric pattern.
![]() |
| PIX14 |
This blog is property of Edward Shore - 2015.
PROGRAMS:
EXPORT PIX05()
BEGIN
LOCAL x,y,j,k;
RECT_P(#0h);
FOR x FROM 1 TO 318 DO
FOR y FROM 1 TO 218 DO
k:=IP(√x+√y+√(x*y)) MOD 318;
j:=(x^2+y^2+x*y) MOD 218;
PIXON_P(k,j,#87CEEBh);
END;
END;
TEXTOUT_P("DONE",0,219,3,#FFFFFFh);
FREEZE;
END;
EXPORT PIX09()
BEGIN
LOCAL x,y,j,k,n,l,s;
RECT_P(#0h);
n:=0;
l:={#FF0000h,#87CEEBh,#FFFF00h,#FF00h};
// main loop
FOR x FROM 1 TO 318 DO
FOR y FROM 1 TO 218 DO
n:=n+1;
s:=1+n MOD 4;
k:=IP((x^2*y)^3+(x*y^2)^3) MOD 318;
j:=IP(e^(x)+e^(y)) MOD 218;
// draw a pixel
PIXON_P(k,j,l(s));
END;
END;
TEXTOUT_P("DONE",0,219,3,#FFFFFFh);
FREEZE;
END;
EXPORT PIX10()
BEGIN
LOCAL x,y,j,k,n,l,s;
RECT_P(#0h);
n:=0;
l:={#1560BDh,#87CEEBh,#FFFF00h,#9E60h};
FOR x FROM 1 TO 318 DO
FOR y FROM 1 TO 218 DO
n:=n+1;
s:=1+n MOD 4;
k:=IP(e^(x)+2*e^(y)) MOD 318;
j:=IP(2*e^(x)+e^(y)) MOD 218;
PIXON_P(k,j,l(s));
END;
END;
TEXTOUT_P("DONE",0,219,3,#FFFFFFh);
FREEZE;
END;
EXPORT PIX11()
BEGIN
LOCAL x,y,j,k,n,l,s;
RECT_P(#0h);
n:=0;
l:={#C0C0C0h,#FFFFFFh,#D4AF37h,#FFFF00h};
FOR x FROM 1 TO 318 DO
FOR y FROM 1 TO 218 DO
n:=n+1;
s:=1+n MOD 4;
k:=IP(x-y) MOD 318;
j:=IP(−2*e^(x)+.5*e^(y)) MOD 218;
PIXON_P(k,j,l(s));
END;
END;
TEXTOUT_P("DONE",0,219,3,#FFFFFFh);
FREEZE;
END;
EXPORT PIX12()
BEGIN
LOCAL x,y,j,k,n,l,s;
RECT_P(#4000h);
n:=0;
l:={#FFFF00h,#FF00h,#964B00h,#0h};
FOR x FROM 1 TO 318 DO
FOR y FROM 1 TO 218 DO
n:=n+1;
s:=1+n MOD 4;
k:=IP(x*y) MOD 318;
j:=IP(x^2+y^2) MOD 218;
PIXON_P(k,j,l(s));
END;
END;
TEXTOUT_P("DONE",0,219,3,#FFFFFFh);
FREEZE;
END;
EXPORT PIX14()
BEGIN
LOCAL x,y,j,k,n,l,s;
RECT_P(#400000h);
n:=0;
l:={#C0C0C0h,#FFFFCCh,#C0C0C0h,#FFFFCCh};
FOR x FROM 1 TO 318 DO
FOR y FROM 1 TO 218 DO
n:=n+1;
s:=1+n MOD 4;
k:=IP(21800*SIN(x)) MOD 318;
j:=IP(31800*√(y)) MOD 218;
PIXON_P(k,j,l(s));
END;
END;
TEXTOUT_P("DONE",0,219,3,#FFFFFFh);
FREEZE;
END;
Sunday, January 25, 2015
Goodies!
Shout out to Texas Instruments for sending me a TI-84 Plus C graphing calculator last month. Thank you! (Apologizes on being late about it.)
My first graphing calculator was a TI-81, which I still have and it's working. I think I currently have four of the TI-84 family (83+ Silver, 84+, and two 84 color editions).
My Amazon order came in last week: "Mathematical Astronomy Morsels" by Jean Meeus. It can shrink wrapped, which is nice. I found out that Meeus calculated how long the Age of Pisces was going to last (until 2597). Here, the definition of age is determined the placement of the vernal equinox.
Thanks Agena Astroproducts for quick delivery.
Just wanted to show you some of the goodies.
Eddie
This blog is property of Edward Shore. 2015
HP Prime: Calculator Art
![]() |
| DRAW3DCUBE |
![]() |
| DRAW3DCYN |
![]() |
| DRAW3DSPH |
DRAW3DWAVE: I wanted something to be drawn using a sine wave.
![]() |
| DRAW3DWAVE |
DRAWSUNSET - This is probably my favorite, since I like sunsets.
![]() |
| DRAWSUNSET |
Tip: The HP Prime screen is 318 pixels wide and 240 pixels deep. If you want to leave room for custom menus, then the canvas is 318 pixels by 218 pixels. The x axis increases to the right, but unlike the Cartesian plane, the y axis increases downward instead of upward.
Eddie
-------------
Programs:
DRAW3DCUBE
EXPORT DRAW3DCUBE()
BEGIN
LOCAL t,a,b,c,d,s;
RECT();
// coord
a:=159-50*COS(45°);
b:=109-50*SIN(45°);
c:=159+50*COS(45°)+1;
d:=159-50*SIN(45°);
// drawing
LINE_P(a+50*COS(45°),b-SIN(45°),a,b);
LINE_P(a,b,159,109);
LINE_P(159,109,c,b);
LINE_P(c,b,a+50*COS(45°),b-SIN(45°));
LINE_P(a,b,a,d);
LINE_P(a,d,159,159);
LINE_P(159,159,159,109);
LINE_P(159,159,c,d);
LINE_P(c,d,c,b);
// left/right side shade
FOR t FROM b TO d DO
LINE_P(a,t,159,t+50*SIN(45°),#FF0000h);
LINE_P(c,t,159,t+50*SIN(45°),#FFh);
END;
// top shade
FOR t FROM 1 TO 50 DO
LINE_P(a+t*COS(45°),b-t*SIN(45°),
a+t*COS(45°),b+t*SIN(45°),#FFFF00h);
END;
FOR t FROM 50 DOWNTO 1 DO
LINE_P(c-t*COS(45°),b-t*SIN(45°),
c-t*COS(45°),b+t*SIN(45°),#FFFF00h);
END;
WAIT(0); // I prefer WAIT(0) to FREEZE;
END;
DRAW3DCYN
EXPORT DRAW3DCYN()
BEGIN
LOCAL t;
HAngle:=0;
RECT();
// cylinder shell
FOR t FROM 0 TO 100 STEP 1 DO
ARC_P(159,70+t,20,0,π,#7DF9FFh);
ARC_P(159,70+t,20,π,2*π,#1560BDh);
END;
// sides
LINE_P(139,70,139,170,#1560BDh);
LINE_P(179,70,179,170,#1560BDh);
ARC_P(159,70,20,0,2*π,#1560BDh);
WAIT(0);
END;
DRAW3DSPH
EXPORT DRAW3DSPH()
BEGIN
// 2015-01-22
LOCAL t;
RECT();
// sphere loop
FOR t FROM 100 DOWNTO 1 DO
ARC_P(159,109,t,0,2*π,#808080h);
END;
// outside
FOR t FROM 59 TO 259 DO
PIXON_P(t,−.0025*t^2+.795*t+70.975);
END;
WAIT(0);
END;
DRAW3DWAVE
EXPORT DRAW3DWAVE()
BEGIN
LOCAL t,a,b;
RECT();
HAngle:=0;
FOR t FROM 0 TO 318 DO
a:=25*SIN(3.95168887244ᴇ−2*t-π)+100;
b:=a+25;
PIXON_P(t,a,#FFh);
PIXON_P(t,b,#FFh);
LINE_P(t,a+1,t,b-1,#87CEEBh);
LINE_P(t,b+1,t,218,#964B00h);
END;
LINE_P(0,100,0,125,#FFh);
LINE_P(318,100,318,125,#FFh);
LINE_P(0,125,0,218,#D4AF37h);
LINE_P(318,125,318,218,#D4AF37h);
LINE_P(0,218,318,218,#D4AF37h);
WAIT(0);
END;
DRAWSUNSET
EXPORT DRAWSUNSET()
BEGIN
RECT(#87CEEBh);
LOCAL t,a,b;
HAngle:=0;
// sun
FOR t FROM 50 DOWNTO 40 DO
ARC_P(159,109,t,0,2*π,#FFA500h);
END;
FOR t FROM 40 DOWNTO 0 DO
ARC_P(159,109,t,0,2*π,#FFFF00h);
END;
// horizon
LINE_P(0,108,318,108);
// ground and water
FOR t FROM 0 TO 159 DO
a:=1.855525955687ᴇ−4*t^3
-5.05717802449ᴇ−2*t^2
+3.67070350319*t+109;
LINE_P(t,a,t,109,#80h);
LINE_P(t,a+1,t,242,#964B00h);
END;
FOR t FROM 159 TO 318 DO
a:=1.23858063728ᴇ−4*t^3
-9.61799073419ᴇ−2*t^2
+23.6382711212*t
-1664.83052851;
LINE_P(t,a,t,109,#80h);
LINE_P(t,a+1,t,242,#964B00h);
END;
// lines
LINE_P(120,111,188,111,#C0C0C0h);
LINE_P(125,113,183,113,#C0C0C0h);
LINE_P(130,115,178,115,#C0C0C0h);
LINE_P(135,117,173,117,#C0C0C0h);
WAIT(0);
END;
This blog is property of Edward Shore. 2015
Friday, January 16, 2015
fx-5800p: Large Factorials, Length of Daylight, & Moments/Skewness
fx-5800p: Large Factorials, Length of Daylight, & Moments/Skewness
Large Factorials
This allows the user to calculate n! for any positive n, even n > 69.
Program BIGFACT
"N"?→N
Σ(log(K),K,1,N) → S
"N = "
10^(Frac(S)) ◢
"* 10^( )"
Int(S)
Examples:
36! ≈ 3.719933268 * 10^ 41
134! ≈ 1.992942746 * 10^ 228
Length of Daylight
D = days after March 21. A 365 day year is assumed.
Program DAYLIGHT
"DAYS AFTER"
"MARCH 21"? → D
Deg
23.45 * sin(D*.9856) → T
"LATITUDE"
"D ● M ● S ●"? → L // for ● press [ ° ' " ]
cos⁻¹ (-tan(L) * tan(T) ) → A
2 * A / 15 → H
"HOURS="
H
Example:
D = 302 (January 17)
L = 40° N (+40°)
Result: H = 9.525548719 hours
D = 302 (January 17)
L = 40° S (-40°)
Result H = 14.47445128
Moments/Skewness
Source: HP 33 Math Pak, 1979
Formulas:
1st Moment: A = Σx ÷ n
2nd Moment: B = Σ(x^2) ÷ n - A^2
3rd Moment: C = (Σ(x^3) - 3 * A * Σ(x^2)) ÷ n + 2 * A^3
Coefficient of Skewness: D = C / B^1.5
Program MOMENTS
0 → N // Initialization
0 → U
0 → V
0 → W
Lbl 0 // Main Loop
N + 1 → N
U + X → U
V + X^2 → V
W + X^(3) → W
"NO. OF PTS."
N ◢
"ANOTHER PT.?" // are you done?
"0=NO 1=YES"
? → Y
Y ≠ 0 ⇒ Goto 0
U ÷ N → A // analysis
V ÷ N - A^2 → B
(W - 3*A*V) ÷ N + 2 * A^(3) → C
C ÷ B^(1.5) → D
"1ST MOMENT"
A ◢
"2ND MOMENT"
B ◢
"3RD MOMENT"
C ◢
"SKEWNESS"
D
Example:
Data: 1.5, 2.8, 2.9, 3.6, 4.7
Results:
1st Moment = 3.1
2nd Moment = 1.1
3rd Moment = 0.018
4th Moment = 0.0156021151
See you all next time - have a great weekend! Go have some fun!
This blog is property of Edward Shore. 2015
HP 15C: The I Squared Rule and HHC 2026
HP 15C: The I Squared Rule and HHC 2026 HHC 2026 Videos Before we start, the videos for HHC 2026 are up! Please take a look, ev...



















