Monday, January 30, 2017

HP Prime and TI-84 Plus CE: Base 10 (Decimal)-Base 12 (Duodecimal/Dozenal) Conversions

HP Prime and TI-84 Plus CE:  Base 10 (Decimal)-Base 12 (Duodecimal/Dozenal) Conversions

Conventions:
X = 10
E = 11
(notation by William A. Dwiggins)

HP Prime Program DEC2DUO

Enter the integer as a number.

EXPORT DEC2DUO(n)
BEGIN
// integer
// EWS 2017-01-30
// base 10 to base 12
LOCAL s,d,k,q,str1;
s:=IP(LN(n)/LN(12))+1;
d:=n;
str1:=":";

FOR k FROM 1 TO s DO
q:=IP(d/12^(s-k));

IF q<10 THEN
str1:=str1+STRING(q);
END;
IF q==10 THEN
str1:=str1+"X";
END;
IF q==11 THEN
str1:=str1+"E";
END;

d:=d-q*12^(s-k);
END;

RETURN MID(str1,2,s+1);
END;

Example:  Convert 12501 from Base 10 to Base 12
DEC2DUO(12501) returns “7299”

HP Prime DUO2DEC

Enter the integer as a string, use X for 10 and E for 11

EXPORT DUO2DEC(str1)
BEGIN
// as a string, X=10, E=11
// 2017-01-30 EWS
// base 12 to base 10
LOCAL s,n,k,str2,q;

s:=DIM(str1);
n:=0;

FOR k FROM 1 TO s DO
str2:=MID(str1,k,1);
q:=EXPR(str2);
IF str2=="X" THEN
q:=10;
END;
IF str2=="E" THEN
q:=11;
END;
n:=n+q*12^(s-k);
END;

RETURN n;
END;

Example:  Convert X2X3 from base 12 go base 10
DUO2DEC(“X2X3”) returns 17691


Note that the latest version (as of 1/30/2017) of the TI-84 Plus CE operating system is used.

TI-84 Plus CE Program DEC2DUO

Input "DEC: ",N
iPart(ln(N)/ln(12))+1→S
DelVar Str1
":"→Str1
N→D
For(K,1,S)
int(D/12^(S-K))→Q
If Q<10
Str1+eval(Q)→Str1
If Q=10
Str1+"X"→Str1
If Q=11
Str1+"E"→Str1
D-Q*12^(S-K)→D
End
sub(Str1,2,length(Str1)-1)→Str1
Disp ">DUO"
Pause Str1

Example:  5825 in base 10, result is 3455 in base 12


TI-84 Plus CE Program DUO2DEC

Disp "X=10, E=11"
Disp "DON'T INCLUDE QUOTES"
Input "DUO: ",Str1
length(Str1)→S
0→N
For(K,1,S)
sub(Str1,K,1)→Str2
expr(Str2)→Q
If Str2="X":10→Q
If Str2="E":11→Q
N+Q*12^(S-K)→N
End
Disp ">DEC"
Pause N

Example:  3EE1 in base 12, result is 6901 in base 10

This blog is property of Edward Shore, 2017



Sunday, January 29, 2017

Base 12 Arithmetic: The Dozenal Society

Base 12 Arithmetic: The Dozenal Society

Introduction

Base 12 is a numerical base system that is based on the powers of 12 instead of 10.  The number line would like:

12^3
(1728)
12^2
(144)
12^2
(12)
Dozens
12^1
(1)
;
12^-1
(1/12)
12^-2
(1/144)
12^-3
(1/1728)

For example, the number 49_12 in base 12 would read 4 dozen, 9 singles.  Its decimal equivalent is 4*12 + 9 = 57.

The number 24;53_12 in base 12 would be equivalent to 2 * 12 + 4 + 5/12 + 3/144 = 455/16 = 28.4375 in decimal.  Note that the semicolon is used as the fractional point.

Converting from base 10 to base 12 involves dividing the number by the powers of 12.  For example, 188 in decimal,

188/144 = 1 R11 
188 – 1 * 144 = 44
44/12 = 3 R8

The dozenal equivalent is 138_12  (1 * 144 + 3 * 12 + 8). 

Base 12 Advocates

There are a number of advocates for replacing Base 10 arithmetic with Base 12 arithmetic.  Two of the prominent groups are:

The Dozenal Society of America (Website: http://www.dozenal.org/   )

The Dozenal Society of Great Britain (Website:  http://www.dozenalsociety.org.uk/index.html )

I also found a number of videos on YouTube who extols the virtues of Base 12, including:



So why base 12 instead of base 10?  The Dozenal Society of America argues that the dozenal way of counting was arrived by societies worldwide:

*  Bakers sold baked goods in twelves
*  Rulers (non-metric) are usually a foot long divided into 12 sections (inches) – used by carpenters
* Historically, pharmacists and jewelers divided a pound into 12 ounces (the pound in this sense is called an Apothecary pound)

I will add that we have 12 months in a year, non-military clocks have work in 12 hours (with an AM/PM indicator), and in most astrological practices where Ophiuchus the Serpent Bearer isn’t included, there are 12 signs of the zodiac.

The factors of 10 are 1, 2, 5, and 10.  The factors of 12 are 1, 2, 3, 4, 6, and 12.  Base 12 advocates argue that the increase in number of factors would make more fractions easier to represent in dozenal than in decimal.  Examples include 0;2 for 1/6, 0;3 for 1/4, and 0;4 for 1/3. 

Base 12 would also facilitate counting, instead of using two hands and their fingers, people would count using the twelve phalanges of a single hand, where the thumb is used as a counter.   One hand can represent singles while the other represents dozens. 

Symbols

Thankfully, the symbols for digits 0 through 9 are retained. Unlike hexadecimal representation (Base 16), there is no uniform consensus of how ten and eleven are represented in Base 12.  Symbols include:

*  A for 10 and B for 11.  These symbols would align with the hexadecimal representation.

*  An upside down 2 for 10 and upside down 3 (Ɛ ) for 11.  In Microsoft Alt codes, the   Ɛ is associated hexcode 0190.  These symbols are popular in Britain.  No offense, but personally, these are not my favorite as look confusing and too close to the 2 and 3 we have. 

*  One suggestion is to use T for 10 and E for 11.  In this video Bon Crowder explains the digits of Base 12:   https://www.youtube.com/watch?v=BJRYCwl5Rgw

* Another set of symbols are called dek (χ ) for 10 and el ( Ɛ except the bottom line is flat) for 11.  These two symbols have been suggested by William A. Dwiggins, and is used in The Dozenal Society of America’s publications.  For typing on the computer, the capital letter X stands for dek and capital letter E for el. 

For the purposes of this blog and the tables presented, I will use X for 10 and E for 11. 

Let’s compare how the basic operations addition and multiplication work in both decimal and dozenal.

Adding:  Base 10 vs. Base 12


Below is an adding table (jpeg image) for numbers 1 through 12 represented in both Base 10 and Base 12.  


Multiplying:  Base 10 vs. Base 12

Below is a multiplication table (jpeg image) for numbers 1 through 12 represented in both Base 10 and Base 12. 


Fractions: Base 10 versus Base 12

Here are some common fractions listed below in both decimal and dozenal systems.  Note the interesting patterns for 0.1 to 0.9 (the table to the right).


Dozenal Representation of Pi

The numerical constant π to 30 places in base 12 is:

π = 3.18480 9493E 91866 4573X 6211E E1515 51X05…

You can find representations of π to 100 places here:  http://turner.faculty.swau.edu/mathematics/materialslibrary/pi/pibases.html

Conclusion

What do you think, would a dozenal, base 12 system work for you?  Should it replace base 10 in everyday mathematics?  Personally I find value in both systems and the ability to quickly double and halve is partially base 10 has survived as the dominant base system for centuries.

In the upcoming week, I work on a program to convert to and from base 10 to 12 integers.  I am thinking about either keep the X (dek) and E (el) or using A for 10 and B for 11.

Eddie

Sources

Schiffman, Jay.  “Fundamental Operations in the Duodecimal System”.  The Dozenal Society of America.  1982 (1192_12http://www.dozenal.org/drupal/sites_bck/default/files/db31315_0.pdf
Retrieved January 27, 2017

Zirkel, Gene. “A Brief Introduction to Dozenal Counting”.  The Dozenal Society of America.  1995 (11X3_12http://www.dozenal.org/drupal/sites_bck/default/files/db38206_0.pdf
Retrieved January 27, 2017

This blog is property of Edward Shore, 2017  (1201_12)

Wednesday, January 25, 2017

HP Prime: Volume and Surface Area of Platonic Solids

HP Prime:  Volume and Surface Area of Platonic Solids

About Platonic Solids

A Platonic solid is one of five three dimensional objects consisting of regular polygons which all faces are identical and perfect symmetry is achieved at each vertex (corner).  The five Platonic solids are classified by the number of faces they have:  tetrahedron (4), hexahedron (aka cube) (6), octahedron (8), dodecahedron (12), and icosahedron (20).

Aside from being well known geometric shapes, Platonic solids were considered sacred and thought to play a significant role in cosmology.  In the 360 BC dialogue Timaeus, Plato considered right triangles to be sub-atomic particles, which form the Platonic Solids.  Each of the Platonic solids represents an element:  tetrahedron represents fire, hexahedron represents earth, octahedron represents air, dodecahedron represents ether, and icosahedron represents water.  Those elements help build all of the universe.   Plato also believed that the elements are interchangeable, which particles split up into triangles and rearranging themselves.  [3]

In 1596, Johannes Kepler wrote Mysterium Cosmographicum (The Cosmographic Mystery).  Based on the Copernican system (which considered our Sun as the center of the Universe), Kepler attributed to structure of Solar System with Platonic Solids.  Each planet had its own corresponding sphere where its orbit was located.  Each of the Platonic solids were placed so that they were inscribed and circumscribed by the spheres.  The order went like this:  Mercury, Octahedron, Venus, Icosahedron, Earth, Dodecahedron, Mars, Tetrahedron, Jupiter, Hexahedron, Saturn.  (Uranus and Neptune were not discovered at this time). [4]

Below is some basic geometric and some eccentric information for the Platonic solids:


Platonic Solid
# of Faces
# of Vertices
# of Edges
Volume
Surface Area
Tetrahedron
4
4
6
A^3 * √2 / 12
A^2 * √3
Hexahedron
6
8
12
A^3
A^2 * 6
Octahedron
8
6
12
A^3 * √2 / 3
A^2 * 2 * √3
Dodecahedron
12
20
30
A^3 * (15 + 7 * √5)
A^2 * (3 * √( 20 + 10 *√5))
Icosahedron
20
12
30
A^3 * 5 * (3 + √5) /12
A^2 * 5 * √3
(A = length of a side) 

Platonic Solid
Internal Angle
Element [1]
Philosophy [1]
Chakra [2]
Duals [3]
Tetrahedron
90°
Fire
Balance, Stability
3rd
(none)
Hexahedron
120°
Earth
Earth, Nature
1st
Octahedron
Octahedron
135°
Air
Love, Compassion
4th
Hexahedron
Dodecahedron
150°
Universe/Ether
Spirit, Heavens
5th, 6th, 7th
Icosahedron
Icosahedron
162°
Water
Expression, Creativity
2nd
Dodecahedron


Below are programs to calculate the volume and surface area of each of the Platonic solids

Prime Programs – Platonic Solids

Tetrahedron
Volume:
EXPORT VOLTET(A)
BEGIN
√2*A^3/12;
END;

Surface Area:
EXPORT SURTET(A)
BEGIN
A^2*√3;
END;

Hexahedron:
Volume:
EXPORT VOLHEX(A)
BEGIN
A^3;
END;

Surface Area:
EXPORT SURHEX(A)
BEGIN
6*A^2;
END;

Octahedron:
Volume:
EXPORT VOLOCT(A)
BEGIN
A^3*√2/3;
END;

Surface Area:
EXPORT SUROCT(A)
BEGIN
2*√3*A^2;
END;

Dodecahedron:
Volume:
EXPORT VOLDOD(A)
BEGIN
(15+7*√5)*A^3/4;
END;

Surface Area:
EXPORT SURDOD(A)
BEGIN
(3*√(20+10*√5))*A^2;
END;

Icosahedron
Volume:
EXPORT VOLICO(A)
BEGIN
5*(3+√5)*A^3/12;
END;

Surface Area:
EXPORT SURICO(A)
BEGIN
5*√3*A^2;
END;


Sources

[1]  Punctured Artefact “Symbolism.  The Platonic Solids”  October 13, 2013.  Retrieved January 22, 2017.  Link:  https://puncturedartefact.wordpress.com/2013/10/13/symbolism-the-platonic-solids-tattoo-design-and-culture/

[2] Patinkas.  “The Merkaba, Platonic Solids, & Sacred Geometry” 2014.  Retrieved January 22, 2017.  Link:  http://www.patinkas.co.uk/Merkaba_Feature_Article/merkaba_feature_article.html

[3] Mathpages.  “Platonic Solids and Plato’s Theory of Everything”  Retrieved January 20, 2017.  Link:  http://www.mathpages.com/home/kmath096/kmath096.htm

[4] Wikiepdia.  “Mysterium Cosmographicum”  Retrieved Janaury 23, 2017.  Link:  https://en.wikipedia.org/wiki/Mysterium_Cosmographicum#Shapes_and_the_planets

The first month of 2017 is almost in the books.  Until next time,

Eddie


This blog is property of Edward Shore, 2017.



Sunday, January 22, 2017

Geometric Relationships: Circle, Sphere, and Equilateral Triangle

Geometric Relationships: Circle, Sphere, and Equilateral Triangle

Circle:  Relationship between Area and Circumference

We know that π is a constant (π ≈ 355/113, but more accurately, π ≈ 3.141592654).  And:

Circumference of a Circle:  C  = 2 * π * r
Area of a Circle: A = π * r^2

Observe that:
C = 2 * π * r
π = C / (2 * r)

And:
A = π * r^2
π = A / r^2

Hence:
C / (2 * r) = A / r^2
(2 * r) / C = r^2 / A
A * 2 * r = r^2 *C
A = C * r / 2

Sphere:  Relationship between Area and Circumference

Volume of a Sphere:  V = 4/3 * r^3 * π
Surface Area of a Sphere:  S = 4 * π * r^2

Solving for π:

V = 4/3 * r^3 * π
3 * V = 4 * r^3 * π
π = (3 * V) / (4 * r^3)

And:

S = 4 * π * r^2
π = S / (4 * r^2)

Then:
(3 * V) / (4 * r^3) = S / (4 * r^2)

Multiply both sides by 4 * r^2:
S = 3 * V / r


Equilateral Triangle:  Relationship between Perimeter and Area


Let a (small a) be the length’s side.   Then the area of the triangle:

A = 2 * (1/2 * a/2 * √3/2 * a) = a^2 * √3/4

With the perimeter:  P = 3 * a,

P = 3 * a
P^2 = 9 * a^2
a^2 = P^2 / 9

And

A = a^2 * √3 / 4
a^2 = 4 * A / √3

P^2 / 9 = 4 * A / √3
A = P^2 * √3 / 36

To summarize:

Circle:  Area and Circumference:  A = C * r / 2
Sphere:   Volume and Surface Area:  S = 3 * V / r
Equilateral Triangle:  Area and Perimeter:  A = P^2 * √3 / 36

The next blog will cover Platonic solids.  At least that’s the plan.  Have a great rest of the weekend.  

Eddie

This blog is property of Edward Shore, 2017.

Thursday, January 19, 2017

Retro Review: TI-60X

Retro Review: TI-60X

TI-60X.  Yes I forgot the multiplication sign here.

Company:  Texas Instruments
Years:  1991 – 1995? 2000?
Year of my TI-60X:  1991 (specifically week 46, November 1991)
Type:  Scientific, Formula Storage
Number of Steps: 96, shown in units of registers (12 registers of 8 steps each)
Operating System: Algebraic
Memory Registers: 12 (A through I, X, Y, Z)
Regressions Available:  Linear

Chipset:  Toshiba T9838
Battery: 1 CR2032

My late Uncle Ralph bought a TI-60X for me in 1992 (I think it was in ’92).  It was my first year of high school.  Uncle Ralph encouraged my love for calculators. (Thanks for all you did for me Uncle)

A Rich Feature Set

The TI-60X operates in Algebraic mode.  Simply, type in the expression as its written, and press [ =/ENTER ]. 

The TI-60X isn’t programmable in the traditional sense (keystroke or BASIC) but rather you can store formulas (A = π * B^2, for example) for later use.  I think the TI-60X is the first of its kind to store formulas.  Today, formula storage is a feature of the Sharp EL-520W.  More on this later.

You have your standard linear regression capabilities.  However, instead of the usual labels a, b, and r, you have ITC (intercept), SLP (slope), and COR (correlation) respectively.  If find these labels much helpful since calculators sometimes tend to switch the roles of a and b in linear regression mode.  Entry is rather easy, just enter the data point and press [ Σ+ ] and you are good to go.  No separate declaration of stats mode needed.

Equation:  y = INT + SLP * x

The Base conversions are on the TI-60X as well.  We also get the logical functions AND, OR, XOR, XNOR, NOT, and 2’s (compliment).  The TI-60X distinguishes the variables A-F from the hexadecimal A-F by assigning the latter set to the 3rd functions of the reciprocal, square, square root, and the trigonometric keys.  On the screen, hexadecimal letters are in bold while storage registers are not.

Fractions are included, as well as the decimal to/from fraction conversion.  The TI-60X has the following additional conversions:

* degrees, decimal-minute-seconds
* polar, rectangular coordinates
* inches, centimeters
* gallons, liters (litres)
* pounds, kilograms
* degrees Fahrenheit (°F), degrees Celsius (°C)

The Blocky Display


Can we talk about the display for a moment?  The text on the TI-60X’s screen is blocky.  According to the Datamath Calculator Museum, the character layout is 5 x 4 dots instead of the usual 7 x 5.  This display could be a throwback to the calculator display of the 1970s and 1980s where the numbers were made of linear segments. 

The article from Datamath on the TI-60X:  http://www.datamath.org/Sci/Modern/TI-60x.htm 

Formula Programming, Simultaneous Equations, and Integration

Up to 12 formulas can be stored, and they can have the labels A, B, C, D, E, F, G, H, I, X, Y, and Z.  The formulas can have more than one variable. Pressing [SOLVE] allow the user to calculate the formula, with each independent variable being prompted.  If there is a numerical value in the independent variable, the TI-60X will display it as a default choice. 

When the “SOLVE YN?” and “REVIEW YN?” prompts appear, the plus key acts as NO and the equals keys acts as YES. 

Integration is pretty easy.  At the appropriate prompted variable, press [2nd] [ , ] (dx) to insert the dx indicator.  You will be asked for a lower limit, upper limit, and the number of intervals.  I am assuming Simpson’s method but I’m not 100% sure.

Simultaneous equations of 2 x 2 and 3 x 3 linear systems are offered.  Execution takes up 2 or 3 registers respectively.   Solutions are stored in X, Y, and for 3 x 3 systems, Z. 

Example: y = 2 * x * sin x

Enter the formula:
Change to Radians mode by pressing [3rd] [LOG] (DR>) until the R indicator is displayed. 

Press [2nd] [ EE ] (FMLA).  At the “NAME?” prompt, press [ ( ] for Y (ALPHA is automatically turned on at this point) and enter the equation.

Calculate y(π/3).  Press [SOLVE].  At X, enter π/3.  Result:  Y = 1.813799364.

Integrate y(x) from 0.5 to 1, use 20 intervals.  Call up the Y= formula again, press [SOLVE].  At the X= prompt, clear the number and enter dx.  Enter the required parameters.  After calculation, the TI-60X displays Y = 0.521068842.  The integral is now stored in Y.

Final Verdict

For what it’s set out to do, the TI-60X accomplishes it rather well.  The calculator is rich with features and there is some storage for some formulas.  I also like the bolder blocky numbers in the display, they are easier to read.  I think the TI-60X launched the advanced scientific calculator genre which is now common place. 

Yes, this calculator is worth collecting.  I’m not sure what the prices are to purchase a used on from eBay, Amazon, or other shopping website, but I imagine it’s not expensive.  (I think the 60X was about $30-$40 when it was sold new back in the 1990s). 

Thank you for comments and support.  Until next time,

Eddie

This blog is property of Edward Shore, 2017.

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...