Monday, October 29, 2018

Countdown: The Numbers Game

Countdown: The Numbers Game

Introduction

The Numbers Game is part of a worldwide famous game show called Countdown.  Countdown is a game show that has two contestants: a champion and a challenger.  There are three type of rounds:

Letters Round: a contestant chooses 9 letters consisting a combination of vowels and constants.  Both contestants have 30 seconds to come up longest valid work possible.

Numbers Round:  this will be described in detail below.

Conundrum:  this is the final round of a game, where both contestants are to solve an anagram (usually made of two or three smaller words) of nine letters.  It is a toss up.  Sometimes one player is so far in the lead that this round is just for show.

In the British game show, a champion who wins 8 straight games retires. 

This game show is enjoyed around the world, mainly in Britain (1982 - present), France (1965 - present) named Des chiffres et des lettres, Serbia (1993 - present) named TV Slagalica, and Turkey (1990 - present) named Bir Kelime, Bir islem. 

Curiously, this game show has never aired in the United States: only two unsold pilots.  Thank goodness for YouTube.

Rules of the Numbers Round

We are given six numbers.  Typical the pool of numbers contain a pair of each integer 1 through 10, one 25, one 50, one 75, and one 100.  Out of the pool, six numbers are selected.

 A target number, also an integer, between 100 to 999 is randomly selected.  Your goal is to create a mathematical sentence using only the following:

* Addition
* Subtraction
* Multiplication
* Division

You want to get to the target number exactly if possible.  Sentences that get near the number, within 10 high or low, are allowed.  On the British game show, the most points are given for hitting the target exactly (10), 7 for being 1-5 away, and 5 for being 6-10 away.  The game show allows 30 seconds. 

All results, including immediate results, must be integers.  Several calculations may be combined.

Using a Deck of Playing Cards

You can simulate a Numbers Round by using a standard deck of playing cards.    Designate the cards as follows:

* Aces count as 1
* 2 - 10 count as their value
* Jack counts as 25
* Queen counts as 50
* King counts as 75
* Joker counts as 100




Use can think of a three digit number for a target, or let a calculator or computer application determine the target numbers. 

Example Games


Drawn Numbers: 1, 3, 4, 6, 7, 25 (Jack) -  Target Number: 528

One possible solution is:

 ( ( 4 - 1 ) × 7 × 25 ) + 3 = 528


Drawn Numbers: 4, 5, 5, 7, 8, 75 (King) - Target Number: 590

There are two ways I found to get the target number:

7 × 75 + (8 + 5) × 5 = 590

8 × 75 - 5 - 5 = 590

If you need more help, watch the videos in the Sources section to get a better idea on how the Numbers Game is played. 

Try These Number Games

See what you can come up with... depending on the draw, it could be difficult and it could be easy.  Have fun!


Drawn Numbers: 4, 5, 5, 7, 8, 8.   Target Number: 598


Drawn Numbers: 1, 2, 3, 6, 25 (Jack), 75 (King).  Target: 118


Drawn Numbers: 1, 2, 3, 3, 6, 6.  Target Number:  102


Drawn Numbers: 2, 4, 6, 7, 9, 50 (Queen).  Target Number: 611

Remember:

1.  Use only the numbers drawn.  You can use a number twice if the number has been drawn twice. 

2. Get close to the target number as possible.

Sources:

Maths Teacher:  "Countdown Numbers Game 6 February 2018" - published 2/11/2018
Link: https://www.youtube.com/watch?v=6D5eVsX-JL8
Retrieved October 29, 2018

Maths Teacher:  "Countdown Numbers Game 29 January 2018" - published 2/12/2018
Link:  https://www.youtube.com/watch?v=QCEvvc4UvRk
Retrieved October 29, 2018

Countdowngoofs: "Countdown - The Most Extraordinary Numbers Game Ever?" - published 2/18/2009
Link:  https://www.youtube.com/watch?v=pfa3MHLLSWI
Retrieved October 29, 2018

Wikipedia "Countdown (game show)"  - last edited 10/22/2018
Link:  https://en.wikipedia.org/wiki/Countdown_(game_show)
Retrieved October 29, 2018

Eddie

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

HP 12C Substantial Presence Test: When the Payee Becomes a Resident Alien

HP 12C Substantial Presence Test: When the Payee Becomes a Resident Alien


Introduction

When a U.S. company or entity pays a foreign entity or a person who is not a U.S. Citizen and it is U.S. source income, IRS law dictates that the payer must determine whether the payee is a resident alien or a non-resident alien. 

One test that is applied to foreign nationals is the substantial presence test.  The substantial presence test is in two parts:

1.  If the payee is physically present in the United States for less than 31 days in a calendar year, that person is a nonresident alien.

2.  If the payee is physically present 31 days or more, a mathematical formula is used:


* Count all the days the foreign national is in the U.S. this current year.


* Count 1/3 of the days present in the U.S. last year.


* Count 1/6 of the days present in the U.S. two years ago


If the sum is 183 or greater, then the payee is a resident alien.  Otherwise the payee is a nonresident alien.

Tax laws for payments to U.S. resident aliens versus nonresident aliens differ; the specifics are beyond the scope of the blog.

The following program determines the residency date of an international payee depending on when the payee first came to the United States with several assumptions:

1.  We are assuming that none of the exemption rules apply (such as an F-1 student does not count any days towards the substantial presence test for up to five calendar years). 

2.  The program also assumes the payee does not leave the United States when the payee enters the country.  If the payee leaves the U.S. for a time period, this program will not give accurate results.

Please Note:  This program is NOT tax advice.  Should you have any tax questions, please consult a professional tax prepare.  Also, this date is for federal tax purposes only, and has no effect on the payee's immigration status.

The program is assumed to be in U.S. date M.DY format (MM.DDYYYY). 

HP 12C Program:  Tax Residency Date for Foreign Payees

01 36 ENTER
02 36 ENTER
03 44, 0 STO 0
04 1 1
05 26 EEX
06 2 2
07 20 *
08 43, 24 FRAC
09 44, 1 STO 1
10 1 1
11 2 2
12 3 3
13 1 1
14 40 +
15 1 1
16 26 EEX
17 2 2
18 10 ÷
19 43, 26 ΔDYS
20 1 1
21 8 8
22 3 3
23 43, 34 x ≤ y
24 43, 33, 45 GTO 45
25 34 x < > y
26 3 3
27 10 ÷
28 43, 25 INTG
29 30 -
30 45, 1 RCL 1
31 1 1
32 26 EEX
33 4 4
34 16 CHS
35 40 +
36 1 1
37 0 0
38 1 1
39 40 +
40 1 1
41 26 EEX
42 2 2
43 10 ÷
44 43, 33, 46 GTO 46
45 45, 0 RCL 0
46 34 x < > y
47 43, 16 DATE
48 43, 33, 00 GTO 00

Example 1: 
Substantial Presence Test starts at January 1, 2018 (1.012018)
Result:  7.032018 (July 3, 2018)

Example 2:
Substantial Presence Test starts at August 17, 2017 (8.172017)
Result:  5.192018 (May 19, 2018)


Source:

"Substantial Presence Test"  Internal Revenue Service  https://www.irs.gov/individuals/international-taxpayers/substantial-presence-test


Eddie


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

Sunday, October 21, 2018

HP Prime: Feet/Feet-Inch-Fraction Conversions (compact format)

HP Prime:  Feet/Feet-Inch-Fraction Conversions  (compact format)

Introduction

The two functions presented on this blog entry are FIFT (feet-inches-sixteenth of inches to feet) and FTFI (feet to feet-inches-sixteenth of inches).  The format of the feet-inches-sixteenth of inches are as follows:

FF: feet
II: inches
NN: sixteenth of an inch

Example:  4.0107 -> 4 feet 1 inch 7/16
Example: 5.1108 -> 5 feet 11 inches 1/2
Example: 3.06142 -> 3 feet 6 inches 14.2/16

There is no rounding or fraction simplification involved with this format.

HP Prime Program FIFT:    FF.IINN to Feet

EXPORT FIFT(X)
BEGIN
// 2018-10-08 EWS
// FF.II16 → FEET
LOCAL Y,Z;
Y:=100*FP(X);
Y:=(IP(Y)+100*FP(Y)/16)/12;
Z:=IP(X)+Y;
RETURN Z;
END;

Examples:

FIFT(6.111) returns 6.96875   (6 ft 11 in 10/16 -> 6.96875 ft)
FIFT(0.0808) returns 0.70833333333 (8 in 8/16 (8 in 1/2) -> 0.70833333333 ft)

HP Prime Program FTFI:  Feet to FF.IINN


EXPORT FTFI(X)
BEGIN
// 2018-10-08 EWS
// FEET → FF.II16
LOCAL Y,Z;
Y:=FP(X)*12;
Z:=IP(Y)/100; 
Y:=FP(Y)*16/10000;
Z:=IP(X)+Z+Y;
RETURN Z;
END;

Examples:

FTFI(5.78125) returns 5.0906  (5.78125 ft -> 5 ft 9 in 6/16  (5 ft 9 in 3/8))
FTFI(4.05) returns 4.00096  (4.05 ft -> 4 ft 9.6/16 in)

Eddie

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

Casio fx-CG50: Version 3.20: Python Comes to Casio!

Casio fx-CG50:  Version 3.20:  Python Comes to Casio!




The Casio fx-CG 50 joins the HP Prime and the French calculator NumWorks to add Python to its list of programming modes.  The Python mode comes by a software update. 
This update is only for the newest Casio fx-CG 50.  I'm not sure if Python will be available for any other Casio models yet. 

The Python is Micro Python 1.9.4.  Below are screenshots of the Python mode in action.  I typed in the OCTA program from the User's Guide as an example.





Get Version 3.20 here:  https://edu.casio.com/products/graphic/fxcg50/

Click under OS Update Information.

Also consider getting the updated User's Guide.  The Python programming module is discussed in Chapter 17.  The user's guide can be found here:

https://support.casio.com/storage/en/manual/pdf/EN/004/fx-CG50_Soft_v320_EN.pdf

Eddie

All original content copyright, © 2011-2018.  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 11C (and Emulators): Sun's Approximate Declination, Altitude, and Azimuth

HP 11C (and Emulators):  Sun's Approximate Declination, Altitude, and Azimuth

Introduction

The following program calculates three positions for our Sun in our Solar System:

1.  Declination of the Sun (δ = 0° at the Equinoxes)
2.  Altitude of the Sun (height of the sun)
3.  Azimuth of the Sun (degree from latitude ground-wise north)
 
Formulas Used:

Inputs:
D = days after the vernal equinox (usually March 20 or March 21)
L = latitude given in D.MMSS format (avoid ±90°)
T = time before solar noon (12 PM).  Example: 9 AM, T= 3.  3 PM, T = -3.

Declination:
δ = 23.45 * sin(D * 0.9856)

Altitude:
H = asin(cos L * cos D * cos(15 * T)) + sin L * sin D)

Azimuth:
A = acos((sin H * sin L - sin D) / (cos L * cos H))

Before running the program, store D in R1, L in R2, and T in R3.

HP 11C Program: Sun Declination, Altitude, Azimuth

001 42, 21, 13 LBL C
002 43, 7 DEG
003 45, 1 RCL 1
004 48 .
005 9 9
006 8 8
007 5 5
008 6 6
009 20 ×
010 23 SIN
011 2 2
012 3 3
013 48 .
014 4 4
015 5 5
016 20 ×
017 44, 4 STO 4
018 31 R/S
019 24 COS
020 45, 2 RCL 2
021 43, 2 →H
022 24 COS
023 20 ×
024 45, 3 RCL 3
025 1 1
026 5 5
027 20 ×
028 24 COS
029 20 ×
030 45, 2 RCL 2
031 43, 2 →H
032 23 SIN
033 45, 4 RCL 4
034 23 SIN
035 20 ×
036 40 +
037 43, 23 ASIN
038 44, 5 STO 5
039 31 R/S
040 23 SIN
041 45, 2 RCL 2
042 43, 2 →H
043 23 SIN
044 20 ×
045 45, 4 RCL 4
046 23 SIN
047 30 -
048 45, 2 RCL 2
049 43, 2 →H
050 24 COS
051 45, 5 RCL 5
052 24 COS
053 20 ×
054 10 ÷
055 43, 24 ACOS
056 44, 6 STO 6
057 43,32 RTN


Example 1:
Stored Data: 
R0 = 184 (approximately September 21),
R1 = -14° 50' 12" (entered as -14.5012)
R2 = 0 (noon)

Output:
δ ≈ 13.1576°
H ≈ 62.0058°
A = 180.0000°

Example 2:
Stored Data: 
R0 = 68 
R1 = 46°
R2 = 4 (8 AM)

Output:
δ ≈ 21.5892°
H ≈ 35.9899°
A ≈ 84.4083°

Sources:

Hewlett Packard.  "Sun Altitude, Azimuth, Solar Pond Absorption", HP 67/97 Energy Conservation December 1978.
Shore, Edward.  "HP 35S: Sun Altitude, Azimuth, Solar Pond Absorption"  Eddie's Math and Calculator Blog:  http://edspi31415.blogspot.com/2013/06/hp-35s-sun-altitude-azimuth-solar-pond.html  June 7, 2013

Eddie

All original content copyright, © 2011-2018.  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 11C (and Emulators): The Four Means

HP 11C (and Emulators):  The Four Means

Introduction

The following program uses the statistical registers to calculate four types of mean:

Arithmetic Mean:  μ = Σx / n

Harmonic Mean:  HM = n / Σ(1/x)

Geometric Mean:  GM = (Πx) ^ (1/n)

Root Mean Square:  RMS = √(Σx^2 / n)


The HP 11C uses the following registers in statistical analysis.  Be sure to clear registers by pressing [ f ] [ x<>y ] (CLEAR REG) before beginning.  Also, after clearing the registers, store 1 in register 7 (R7).  

R0 = n
R1 = Σx
R2 = Σx^2
R3 = Σy
R4 = Σy^2
R5 = Σxy

LBL A:  Enter data
LBL B:  Analysis: μ [R/S], HM [R/S], GM [R/S], RMS

HP 11C Program: The Four Means

Don't forget to store 1 in R7 prior to running the program. 

001 42, 21, 11 LBL A
002 49 Σ+
003 43, 36 LAST x
004 44, 20, 7 STO× 7
005 15 1/x
006 44, 40, 6 STO+ 6
007 43, 32 RTN

008 42, 21, 12 LBL B
009 43, 0         x-bar 
010 32 R/S
011 45, 6         RCL 6
012 15 1/x
013 45, 0 RCL 0
014 20 *
015 31 R/S
016 45, 7         RCL 7
017 45, 0         RCL 0
018 15 1/x
019 14 y^x
020 31 R/S
021 45, 2         RCL 2
022 45, 0         RCL 0
023 10 ÷
024 11
025 43, 32 RTN

Example:
Sample set:  4.25, 4.08, 5.63, 6.13, 4.48, 7.02 ( 6 data points )

Keystrokes:

4.25 [ f ] [ √ ] (A)
4.08 [ f ] [ √ ] (A)
5.63 [ f ] [ √ ] (A)
6.13 [ f ] [ √ ] (A)
4.48 [ f ] [ √ ] (A)
7.02 [ f ] [ √ ] (A)

[ f ] [e^x] (B)   5.2650 (arithmetic mean, μ)
[R/S] 5.0556 (harmonic mean, HM)
[R/S] 5.1575 (geometric mean, GM)
[R/S] 5.3748 (root mean square, RMS)


Eddie
All original content copyright, © 2011-2018.  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 11C (and Emulator Apps): Thin Lens Analysis

HP 11C (and Emulator Apps):  Thin Lens Analysis




Given the distance from the object to the lens (U) and the focal distance (F), the program calculates object from the image from the lens (V) and magnification (M) of the image by the following equations:

V = 1 / (1/F - 1/U)
M = -V / U

HP 11C Program: Thin Lens Analysis

Note:  The keystrokes are also applicable for any HP 11C emulator apps. 

001 42, 21, 13 LBL C
002 15 1/x
003 34 x<>y
004 15 1/x
005 43, 36 LAST x
006 33 R↓
007 30 -
008 15 1/x
009 31 R/s
010 36 ENTER
011 16 CHS
012 43, 33 R↑
013 10 ÷
014 43, 32 RTN

To run:  enter U (object distance) then F (focal distance).  Then run label C ([ f ] [10^x] (C)).  The first result is V (image distance).  Press [R/S] to get M (magnification).

Example 1:
Input:  U = 0.24 ft, F = 0.16 ft
Output:  V = 0.4800 ft (R/S) M = -2.0000

Example 2:
Input: U = 1.5 ft, F = 0.8 ft
Output: V ≈ 1.7143 ft, M ≈ -1.1429

Eddie

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

Saturday, October 13, 2018

HHC 2018: The Videos

HHC 2018: The Videos


HHC 2018 took place on September 28 and 29, 2018 in San Jose, CA.  Earlier I gave a short description of each of the talks of the conference.  Here are links to the videos, as provided by hpcalc.org.

To read my review, click here:

http://edspi31415.blogspot.com/2018/10/hhc-2018-in-review.html

Disclaimer

I am under a non-disclosure agreement, which means that I will not be able to discuss certain details of the conference due to confidentiality.

Saturday:  September 29, 2018. 

Thomas Chrapkiewicz - Silicon Valley History

Chrapkiewicz takes us on a history of Silicon Valley.

https://www.youtube.com/watch?v=jvHQIvTk2y8

Namir Shammas - Polynomial Roots by Optimization

Shammas describes several methods to obtain the roots of the following polynomial equation:

p(x) = x^n + a_(n-1) * x^(n-1) + a_(n-2) * x^(n-2) +  ... + a_1 * x + a_0

where a_i are all real coefficients.

https://www.youtube.com/watch?v=dtRFeVgqmx0

Sylvain Côté - HP-IL Compendium Presentation

Côté prepared an HP-IL Compendium, consisting of any information related to the Hewlett-Packard Interface Loop (better known as the HP-IL).

https://www.youtube.com/watch?v=u9l23L0lbMY

Monte Dalrymple - 41C Flexible Module

Dalrymple introduces a 41C Flexible Hardware Module (FHM), which is a circuit board to be placed in a regular HP 41C. 

https://www.youtube.com/watch?v=g7yT50lPA4E

Gene Wright - Old Calculator Ads & Unisonic Calculators

Old Calculator Ads:

https://www.youtube.com/watch?v=FME-zyncpWA

Unisonic Calculators:

https://www.youtube.com/watch?v=6bffQ51iNJI

Dave Cocrhan - HP Calculations from Desktop to Pocket

Cochran tells the story on how the HP 35 calculator came to be. 

https://www.youtube.com/watch?v=AfL6tV5uQ0U

Felix Gross & David Hayden - Recreating the 15C Advanced Functions Handbook

Gross and Hayden went through the process on how the HP 15C Advanced Functions Handbook was recreated.

https://www.youtube.com/watch?v=bSUntbQp6sc

Jim Johnson - What was the first Personal Computer?

Jim Johnson takes us through a time line and determines what was the first personal computer.

https://www.youtube.com/watch?v=6sZUu-8zOrE

Richard Nelson - Add SIG to FIX, SCI, & ENG?

Richard Nelson is a fan of significant digits, especially when it comes to working with analog meters and digital meters.

https://www.youtube.com/watch?v=8qLSUk78oEg

Sunday:  September 30, 2018

Thomas Chrapkiewicz - HP-48 RS-232 Plotter Demo

Chrapkiewicz demonstrates printing programs and text from an HP 48 to a HP 7550 plotter.

https://www.youtube.com/watch?v=xrE7BoyJDis

Richard Schwartz - Naive Testing of the 997x Random Number Generator

Using a WP-34S, Schwartz tests the reliability of random number generators.

https://www.youtube.com/watch?v=XXwLgwJgl0Y

Thomas Chrapkiewicz - HP-48 Audio/Acoustic Performance

Chrapkiewicz tests the audio performance of the HP 48, HP 48GII, and HP 49g+.

https://www.youtube.com/watch?v=HW1fXot_oJ4

Namir Shammas - New Algorithm for Numerical Integration

Shammas explores an alternate algorithms for numerical integration, the HFVQI (Half-Function Value Quadratic Integration). 

https://www.youtube.com/watch?v=E2tEODlmRxM

Benoit Maag - Re-purposing old TI Calculators

Benoit Maag talks about how he re purposed two classic Texas Instruments calculators, the TI-1200 and TI-1250.

https://www.youtube.com/watch?v=mxwn67G2P60


See you next time - I am working on some programs for the HP 11C. 

Eddie

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

Saturday, October 6, 2018

RPN 1250: One of a Kind (HHC 2018)

RPN 1250: One of a Kind  (HHC 2018)


RPN 1250 


Introduction

The RPN 1250 is a re-purposed Texas Instruments TI-1250 calculator by Beniot Maag.  Maag has previously re-purposed the Texas Instruments TI-1200 into the RPN 1200.  Nothing short of marvelous.

The RPN 1250 has been Maag's project since 2016.  He posted a thread on the MoHPC's website:  http://www.hpmuseum.org/forum/thread-4819.html

I won the RPN 1250 as one of the door prizes at HHC 2018.  You can read my summary here: http://edspi31415.blogspot.com/2018/10/hhc-2018-in-review.html

The RPN 1250 is powered by a V9 volt battery.

Features


The RPN 1250 has 24 keys.  Each key, except one, has a primary function with two shifted functions.  The shift key, labeled [ F/G ], is a dual shift key.  Press [ F/G ] once for the first shifted functions (in yellow), twice for the second shift functions (in blue), and three times recycle to the original function.

Update:  The RPN 1250 has 24 keys, not 40.  (10/13/2018)

The functions include:  trigonometry, logarithmic, exponential, integer part, fraction part, reciprocal, roots, and powers.  Four sets of conversions are included: in/mm, mi/km, lb/kg, and °C/°F.

The angle for the trigonometric functions are in radians.  There is a convert to radians function.

The display is 7 digits or 4 with 2 digit exponents, with the default mode is FIX 2 (2 decimal places).   However, the largest number the RPN 1250 can handle is 3.40 * 10^38.

The Escape Mode

The escape mode allowed the use to show what version of firmware, adjust the brightness of the LCD display and execute display tests.

Programming

The RPN 1250 has RPN keystroke programming.  There are 20 registers (0-9 and .0 (dot 0) through .9 (dot 9)).  Store and recall arithmetic are available.  Stack contents are accessible, along with an indirect addresses through the [ENTER] key.

There are 20 labels available (0 to 9 and .0 to .9).  On the surface, the memory is volatile.  However, the RPN 1250 has three permanent slots that we can store the program space into three slots.

There are twelve tests that called by the TST function:  x = 0, x ≠ 0, x > 0, x ≥ 0, x < 0, x ≤ 0, x = y, x ≠ y, x > y, x ≥ y, x < y, and x ≤ y.

Each step in the program is shown by the step and the command pressed.  Displaying the command proved to be a challenge for Maag, since he only had seven segment characters to work with.

The program space is 98 steps.  The programming works well and is a pleasure to use.  The thing I have to get used to is the having to press the shift key two times for the second shifted functions.

Let's take a look at few sample programs.

Each program has input and output rounded to 2 decimal places.

RPN 1250 Program:  Area of the Circle

1 LBL 0
2 x^2  
3 π
4 *
5 RTN

Examples:
Input: 5.00,  Output: 78.54
Input: 10.00, Output: 314.56
Input: 28.00, Output: 2463.01

RPN 1250 Program: Sign Function

1 LBL 1
2 ENTER
3 x^2
4 √
5 ÷
6 RTN

Examples:
Input:  -54.00, Output: -1.00
Input:  38.00, Output:  1.00
Input: 0.00, Output:  dt Error

RPN 1250 Program: Hypothesis

1 LBL 2
2 x^2
3 x<>y
4 x^2
5 +
6 √
7 RTN

Examples:
Input: 3.00, 4.00, Output: 5.00
Input: 5.00, 8.00, Output: 9.43
Input: 19.00, 11.00, Output: 21.95

RPN 1250 Program: Sine of a Angle in Hours-Minutes  (format HH.MM°)

1  LBL 3
2  ENTER
3  IP (INT)
4  x<>y
5  FP (FRC)
6  1
7  0
8  *
9  6
10 ÷
11 +
12 →RAD
13 SIN
14 RTN

Examples:
Input:  40°50', Output:  0.65
Input:  20°13', Output:  0.35

RPN 1250 Program:  Quadratic Equation  (x^2 + b*x + c = 0)

Store b in R1 and c in R2.  Run the program.  You get the discriminant.

Discriminant is negative:  next two results is the real and imaginary part of the complex conjugate roots

Discriminant is non-negative:  the next two results are the real roots

1 LBL 0
2 RCL 1
3 x^2
4 RCL 2
5 4
6 *
7 -
8 STO 3
9 R/S
10 TST 1  (x<0 font="">
11 GTO 8
12 RCL 1   (real roots)
13 CHS
14 RCL 3
15 √
16 +
17 2
18 ÷
19 R/S
20 RCL 1
21 CHS
22 RCL 3
23 √
24 -
25 2
26 ÷
27 RTN
28 LBL 8  (complex roots)
29 RCL 1
30 CHS
31 2
32 ÷
33 R/S
34 RCL 3
35 x^2
36 √
37 √
38 2
39 ÷
40 RTN

Examples:
Input:  R1 = 8, R2 = 3; Output: Discriminant: 52.00, Root 1: -0.39, Root 2: -7.61
Input:  R1 = 6, R2 = 11; Output: Discriminant: -8.00, Real: -3.00, Imag: 1.41  (-3.00 ± 1.41i)

Thank you Benoit Maag, this calculator is truly one of the kind!

Eddie

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

Retro Review: Hewlett Packard HP 11C

Retro Review:  Hewlett Packard HP 11C

HP 11C 

This is one calculator I sought after for a long time.  Thanks to Mark Hardman for donating the door prize at HHC 2018. 

General Information

Company:  Hewlett Packard
Type:  RPN Programmable
Display:  10 digits with 2 digit exponents
Power:  3 LR44 or A76 batteries
Memory:  up to 21 storage registers, up to 203 programming lines
Years:  1981-1989
Original Cost: $80
Documentation:  Manual

The HP 11C is an RPN programmable scientific calculator from Hewlett Packard. The calculator has four stacks (X, Y, T, Z) to use for calculations.  The 11C is part of the landscape series that Hewlett Packard produced in the 1980s, including the long-standing and still current selling HP 12C, the HP 15C, which got a short reprise in 2011-2012, and the beloved HP 16C.  The HP 11C does not have as many functions as the HP 15C, and we'll get to the comparisons later. 

Programming and Memory

The HP 11C has memory that shared between registers and program lines.   The HP 11C has 63 permanent lines of memory and one permanent register, R_I.  Note that R_I is also used as an indirect register.  The rest of the memory is a combination of up to a maximum of 20 registers or 140 additional program lines.  Each numerical register costs 7 lines of program lines.  Conversion from numerical register to program lines are automatic as program space increased in size.

The HP 11C allows for labels A, B, C, D, and E with numeric labels 0-9.  Program execution from labels A-E can be run directly from the keyboard. 
There are eight comparisons tests:  x ≤ y, x < 0, x > y, x > 0, x ≠ y, x ≠ 0, x = y, and x = 0.  If the comparison test is true, then the next step is executed.  Otherwise, the next step is skipped.

DSE (decrease, skip if equal) and ISG (increase, skip if greater) are present, uses the current value in R_I.  DSE and ISG are used for FOR loops, the format of R_I is nnnn.xxxyy, n is the current value, x is the final value, and y is the increment/decrements. 
There are two flag variables for the HP 11C: 0 and 1.  The three commands with flags are SF (set flag), CF (clear flag), and F? (is flag set?). There is no indicator when flags are set.

The Back of the HP 11C 

The back of the HP 11C contains important information:  four conversion formulas, two variable functions, statistics registers, ISG/DSE diagrams, and the meaning of seven error codes (0-6). 

Statistics

The HP 11C has linear regression (y = a*x + b).  The L.R. displays the intercept (b) in the X stack and slope (a) in the Y stack. 

Stat registers used:  R0 = n, R1 = ⅀x, R2 = ⅀x^2, R3 = ⅀y, R4 = ⅀y^2,  R5 = ⅀xy.   You will need at least 6 memory registers.

The Keyboard

The keyboard of the HP 11C matches the legendary reputation of Hewlett Packard calculators  have for keyboards. 

Final Verdict

Yes, I recommend the HP 11C for the collection.  If you want to find an HP 11C for sale, you are going to have shop for the best price because they are popular, like the HP 15C. 

And Now for the Comparison

HP 11C (top), HP 15C Limited Edition (bottom, sorry for the light blocking out the text)

The HP 11C does not have as many functions of the HP 15C.  First, the memory space is not as great (203 for the 11C, 448 for the 15C).  Also the HP 15C has integration, a solver, matrix, and complex numbers.  The tests for the 11C are right on the keyboard (the shifted functions of the arithmetic functions), while the 15C has the majority of tests through the TEST n command.

Eddie

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

HHC 2018: I Won a Programming Contest! (Biorhythm)

HHC 2018:  I Won a Programming Contest!  (Biorhythm)



Get Our Biorhythms On

In the 1970's, the debunked Biorhythm Theory sought out to measure three facets of our lives beginning at the day of birth:

* Physical: a 23 day cycle
* Emotional: 28 day cycle
* Intellectual: 33 day cycle

The three days start at 0 on the day our birth, then rise and fall between -100 and 100 in sinusoidal waves.  Those waves can be characterized by the following equations:

Physical:  y = 100 * sin (2 * π * x / 23)   (radians)
Emotional: y = 100 * sin (2 * π * x / 28)
Intellectual: y = 100 * sin (2 * π * x / 33)
where x is the number of days from birth. 

The task was to calcuate the next extreme day after the current day.  Here are the details of the contest:  http://hhuc.us/2018/HHC-2018-Programming-Contest.pdf

The thread on the MoHPC forum:  http://www.hpmuseum.org/forum/thread-11390-page-2.html

I entered an HP Prime and won in that category.  Here is the program listing.

HP Prime Program: BIOXTR

sub1(); // elegant background screen

EXPORT BIOXTR()
BEGIN
STARTAPP("Function");
Xmin:=−6*π;Xmax:=6*π;
Ymin:=−1.1;Ymax:=1.1;
sub1();
TEXTOUT("BIORYTHM",−2*π,0,5);
TEXTOUT("by Edward Shore",−2*π,−.5,5);
TEXTOUT("Find your fate.",
−2*π,−2,5);
WAIT(1);

// birthdate
LOCAL b,b1,b2,b3;
INPUT({b1,b2,b3},
"When were you born?",
{"Month: ","Day: ",
"Year: "});
b:=b3+b1/100+b2/10000;

// 
LOCAL d,L0,L1,t,m,p;
d:=DDAYS(b,Date);
L0:={CEILING((d-5.75)/11.5),
CEILING((d-7)/14),
CEILING((d-8.25)/16.5)};
L1:={ROUND(11.5*L0(1)+5.75,0),
ROUND(14*L0(2)+7,0),
ROUND(16.5*L0(3)+8.25,0)};

// loop
WHILE L1(1)≠L1(2) AND L1(1)≠L1(3)
 AND L1(2)≠L1(3) DO
m:=POS(L1,MIN(L1));
L0(m):=L0(m)+1;

L1:={ROUND(11.5*L0(1)+5.75,0),
ROUND(14*L0(2)+7,0),
ROUND(16.5*L0(3)+8.25,0)};
END;

// elegant way to extract the date
IF L1(2)==L1(3) THEN
t:=L1(2);
ELSE
t:=L1(1);
END;
d:=DATEADD(b,t);

// results screen
LOCAL str1;
LOCAL L2:=
{{"Physical: ",23},
{"Emotional: ",28},
{"Intellectual: ",33}};
sub1();
TEXTOUT("Your next extreme day 
is on...",−5*π,1,5);
WAIT(0.5);
str1:=STRING(IP(FP(d)*100))+" / "
+STRING(FP(d*100)*100)+" / "+
STRING(IP(d));
TEXTOUT(str1,−5*π,.6,5);
FOR m FROM 1 TO 3 DO
str1:=L2(m,1)+
STRING(ROUND(100*SIN(2*π*t/
L2(m,2)),0));
TEXTOUT(str1,−5*π,.6-.2*m,5);
END;
WAIT(0);
STARTVIEW(−1);
END;

// screen subroutine
sub1()
BEGIN
RECT(); 
LOCAL t;
HAngle:=0;
FOR t FROM −6*π TO 6*π STEP 12*π/720 DO
PIXON(t,SIN(2*π*t/23),#008000h);
PIXON(t,SIN(2*π*t/28),#FF0000h);
PIXON(t,SIN(2*π*t/33),#0000FFh);
END;
END;



Eddie

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

HHC 2018 In Review

HHC 2018 In Review

HHC 2018 took place on September 28 and 29, 2018 in San Jose, CA.   If you have not gone to a HHC conference, and you love calculators and math, I strongly encourage you to attend.  The conferences take place typically around the latter half of September.

There will be videos from the conference in the upcoming weeks from hpcalc.org.  The following is a short summary of the talks presented in the conference.

Disclaimer

I am under a non-disclosure agreement, which means that I will not be able to discuss certain details of the conference due to confidentiality.

Saturday:  September 29, 2018. 

Thomas Chrapkiewicz - Silicon Valley History

Chrapkiewicz takes us on a history of Silicon Valley.  Despite what most people believe, which included be, the term Silicon Valley did not originate int the 2000s.  The term goes back to Don Hoefler, who first used the term in his article "Silicon Valley in the USA" in 1971.

Some places of interest that Chrapkiewicz highlighted are:

*  A plaque dedicated to inventor Dr. Lee de Forest and the Electronics Research Laboratory, located on Channing Street and Emerson Avenue.

* The HP Garage, located at 367 Addison.

* Stanford University and Stanford Industrial Park.

* A plaque and semiconductor display dedicated to the Schokley Semiconductor Laboratory at 391 S. San Antonio Rd.  Even though Dr. Shockley of Bell Labs started the research into silicon devices, he had an infamous reputation, resulting of eight members of his team left Shockley for the competitor Fairchild Semiconductor in 1957.

Chrapkiewicz also highlights his career and how it lead him to Silicon Valley.  He now works in Audio & Acoustic Research at Ford Motor Company.  His current office is located where the Hewlett Packard sales and service was once located.

Namir Shammas - Polynomial Roots by Optimization

Shammas describes several methods to obtain the roots of the following polynomial equation:

p(x) = x^n + a_(n-1) * x^(n-1) + a_(n-2) * x^(n-2) +  ... + a_1 * x + a_0

where a_i are all real coefficients.

The properties known as the Vieta formulas are to be optimized to find the roots of p(x):

x_1 + x_2 + x_3 + ... + x_(n-1) + x_n = -a_(n-1) / a_n

x_1 * x_2 * x_3 * ... * x_n = (-1)^n * a_0 / a_n

x_1 * (x_2 + x_3 + x_4 + .... + x_n) + x_2 * (x_3 + x_4 + x_5 + ... + x_n) + ... + x_(n-1) * x_n = a_(n-2) / a_n

One method described is the Quasi Lin-Bairstow Method which reduces p(x) by the form:

p(x) - q(x) * b(x) + r(x)

q(x): a quadratic polynomial in which roots are obtained from p(x) at each reduction

r(x): a linear equation that servers a remainder

Another method described is a Durand-Kerner algorithm, which uses four equations for iteration to find real and complex roots for p(x).  The method is found to be effective in finding roots of polynomials with both real and complex coefficients.

Article from Shammas:  http://www.namirshammas.com/NEW/PolyRootsOpt.pdf

Sylvain Côté - HP-IL Compendium Presentation

Côté prepared an HP-IL Compendium, consisting of any information related to the Hewlett-Packard Interface Loop (better known as the HP-IL).  The Compendium took six months to complete.

The HP-IL is an interconnection bus that was in the use during the 1980's and 1990's, and serviced the HP-41C, HP-71B, HP-75, HP-80, and general computers.  The peripheral types covered by the Compendium includes controllers, storage devices, printers, plotters, display devices, modems, and other control and specialty devices.

Monte Dalrymple - 41C Flexible Module

Dalrymple introduces a 41C Flexible Hardware Module (FHM), which is a circuit board to be placed in a regular HP 41C.  The module is an upgrade which can facilitate the installation of the time module, extended memory modules, extended function module, service and printer service module, and MLDL (Machine Language Development Lab).

The module is a Lattice iCE40Ultra FPGA, which can be flashed once.  However, the FHM board contains a 32768 Hz oscillator and additional memory resources due to efficient use.

Also introduced is the GNSS module, a 4K ROM module, also made to fit in a HP 41C.  This module gives additional functions, essentially turning the 41C into a GPS system.  You can get the altitude, latitude, longitude, plus display format options and other ROM option commands.

Gene Wright - Old Calculator Ads & Unisonic Calculators

Wright presented a collection of old calculator ads from 1972 to 2010.  Wright also highlights the calculator lineup of Unisonic, particularly from the 1970s:

*  Unisonic 1040:  four-function calculator with a GPM button.  Noted for it's white, blue, and orange keys on a metal case.  It ran on either AAA batteries or a 9 volt battery.

*  Unisonic 767, 788P, 739SQ, 731:  These are also four-function calculators with additional functions such as reciprocal (1/x), square (x^2), and the pi (π) button.

*  Unisonic 931:  A small handheld four-function calculator.

* Unisonic CS-14:  This is a large four-function calculator with several metric-US conversions listed at the bottom.

* Unisonic CASINO 7 and 21 Jimmy The Greek:  These are both four function calculators with a blackjack game.

* Unisonic 796:  A scientific calculator with a shift key only for the inverse of the trig functions (asin, acos, atan).

* Unisonic 799:  A simple scientific calculator.  Your mileage may vary depending on which version of the 799 due to some of the productions had difficult to read key markings.

* Unisonic 1299:  The polar/rectangular and degrees/degress-minutes-second conversions are added.

* Unisonic 1499: Add hyperbolic functions (a [HYP] key), also had a red display.

* Unisonic 766:  A finance calculator featuring linear regression, cost/sell/margin calculations, and time value of money calculations.

It was seeing Unisonic calculators in K-Mart stores in Nashville is what inspired Wright to get into calculators.

Dave Cochran - HP Calculations from Desktop to Pocket

Cochran tells the story on how the HP 35 calculator came to be.  Cochran is loved in the HP calculator community.  He is fundamental in the development in both the HP 9100A and the HP 35, along with HP 65 card reader, the 204 oscillator, and the 3440 digital voltmeter.  For what the HP 35 brought to the engineers, scientists, and math enthusiasts in 1972, the first handheld calculator to have trigonometric functions, logarithmic functions, and power and root functions, it was no wonder why people lined up to pay $395 for this marvel. 

The HP 35 was awarded the IEEE Milestone in Electrical Engineering and Computing Award in 2009.

Links:  http://www.hpmuseum.org/forum/thread-11187.html?highlight=dave+cochran

https://www.edn.com/electronics-blogs/other/4307070/IEEE-Recognizes-HP-35-Calculator-as-a-Milestone-The-Day-Spreadsheet-Management-Failed

Felix Gross & David Hayden - Recreating the 15C Advanced Functions Handbook

Gross and Hayden went through the process on how the HP 15C Advanced Functions Handbook was recreated.  This mainly involved scanning images, recreating the examples, creating keyboard fonts, and lots of proofreading.  This results are outstanding and beautiful.

You can download the file here:  http://h10032.www1.hp.com/ctg/Manual/c03308725.pdf

They also presented a recreated HP-10C manual.

Jim Johnson - What was the first Personal Computer?

Jim Johnson takes us through a time line and determines what was the first personal computer.  Some of the criteria Johnson defines include:

* The computer must be digital and programmable.

* The computer must be commercially available or be readily assembled via a kit.

* The computer must be ready to be use after the basic instruction manual.

The presentation takes us through, among others, the IBM PC (1981), Apple ][ (1977), MITS Altair 8800 (1975), even the HP-65 calculator (1973), Xerox Alto (1973), HP 9830A (1972), Kenbak-1 (1971), Minivac 601, even the GENIAC (1955) before arriving at the Simon (1949).

Why the Simon?  The Simon was a computer kit first described in the 1949 book "Giant Brains, or Machine That Think".  The book provided plans to build the Simon computer, and influenced further development of interactive computers.

Johnson ended his presentation with demonstrating his Altair 8800.

Richard Nelson - Add SIG to FIX, SCI, & ENG?

Richard Nelson is a fan of significant digits, especially when it comes to working with analog meters and digital meters.  Nelson states that significant digits are needed and are useful for digital specifications, consistent accuracy, scientific calculations, and reporting results in technical publications.

What are significant digits?

*  Any non-zero digits (1-9)

*  Any zeros between non-zero digits

*  Final zeroes that is followed by a decimal point (aka trailing zeroes).  This can be tricky.  The number 1000 has 1 significant digit, but the number 1000., with the decimal point put after the final zero, has 4 significant digits.

In the proposed significant digit mode, you are required to enter numbers with that many significant digits.

Rounding presents a challenge, particularly the extra digit is 5.  Example:  rounding 13.5 to the nearest integer.  One proposed method is the Banker's method.  The rules for Banker's method are the same except when the extra digit is 5.  In the case with .5, the number gets rounded to the nearest even integer.

Example:

12.5 gets rounded to 12, while 13.5 gets rounded to 14.

To my knowledge, no calculator currently has a significant digits rounding mode.

Sunday:  September 30, 2018

Thomas Chrapkiewicz - HP-48 RS-232 Plotter Demo 

Chrapkiewicz demonstrates printing programs and text from an HP 48 to a HP 7550 plotter.  The plotter,  introduced in the mid 1980's, handled four sizes of paper:  type A (letter size, 8 1/2 x 11 inches), type B (legal size, 11 x 17 inches), A3 and A4.

All commands dealing with the printer were required to be terminated by a semicolon, with labels ending in 03h.  The text is ASCII.  Furthermore, the plotting space is limited by hard-clip limits and soft-clip limits, the latter determined by the user.

Richard Schwartz - Naive Testing of the 997x Random Number Generator

Using a WP-34S, Schwartz tests the reliability of random number generators.  One of the most used involves the multiplication of 997.   As far as the random number generators involving successive multiplications of 997, your mileage may vary on which random seed you start out with.  Seeds like 1, 3, 7, 17, 21, 23, 41, 43, and 0.200001 are good but any multiple of 2 or 5 isn't.

Schwartz looks for the random number generator to have a uniform distributions and uses the power spectrum, moments, and the Chi Square (χ^2) test are criteria.   With the χ^2 test, the comb factor and the number of bins are used to further investigate the distribution of the random number generator.

Thomas Chrapkiewicz - HP-48 Audio/Acoustic Performance

Chrapkiewicz tests the audio performance of the HP 48, HP 48GII, and HP 49g+.  He states that the original beeper on the HP 48 is louder than later calculators, however, the tones were more sinusoidal on later models.

*  Signals can be characterized by a linear combination of harmonics, such as a Fourier Series.

* The microprocessor's clock rate determines the audio frequency of the calculator.

* The hearing capacity of a bat exceeds the hearing capacity of a dog, which in turn exceeds the hearing capacity of a human.

* The calculator's beeper can be use to set up tones that beep on the hour, minute, even set up alarms.

*  The Bifurcation diagram, set up by the equation x_(n+1) = (x_n)^2 + c where x_0 = 0, is a visualization of how tones bifurcate with each successive calculation.  With this, as c decreases, particularly towards 440 Hz, the successive tones get more chaotic.

Side note:  I wish the HP Prime had a beeper, it was one of the things that made HP calculators unique.

Namir Shammas - New Algorithm for Numerical Integration

Shammas explores an alternate algorithms for numerical integration, the HFVQI (Half-Function Value Quadratic Integration).  This involves calculating the midpoint between the integral limits and performing an inverse Lagrangian interpolation using the following points (a, f(a)), (b, f(b)), and (c, f(c)), where c = (a + b) / 2.  An advantage of this method is that you can reduce the number of intervals needed to reach good accuracy.

For detailed formulas, click here for the Shammas' article:  http://www.namirshammas.com/NEW/hfvqi.pdf

Benoit Maag - Re-purposing old TI Calculators

Benoit Maag talks about how he re purposed two classic Texas Instruments calculators, the TI-1200 and TI-1250.  Despite the limited amount of keys, Maag has re-purposed a TI-1200 into the RPN -1200 and a TI-1250 into the RPN -1250.  This is done by replacing the microchip with a reprogrammed microchip with a driver.

The RPN-1200 has a Microchip PIC 18F2550 with a MAX7219 LED Driver and a 5V power supply, while the RPN-1250 has either a PIC 18F2550 or 18F2680 microchip with a MAX7219 LED driver.

What are the results?  A full functional RPN scientific calculator.  The RPN-1250 is a programmable scientific calculator, similar to an HP 29C.  The RPN-1250 has 98 steps with storage and recall arithmetic, indirect addressing, a host of US-metric conversions, and three slots to save programs.

Maag also had to reconfigure the display, which proved to be a challenge.  Each character has 7 LED segments.  Some letters ended up a capital letters while others were lower case.  Below is a sample.



I won his RPN-1250 as a door prize, it's truly one of a kind, and I plan to post more details about it in a future blog post.

Door Prizes Won from the Conference

HP 11C:  I won it because I won a programming contest!




RPN 1250:  One of a kind, re-purposed calculator made by Benoit Maag.



A HP 71B case

Omnibook OB-425 with 4 MB Memory with OB-425 ROM System Card - a 1990's laptop

More to come!



Eddie

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

Spotlight: Akron Brass FireCalc Pocket Computer

Spotlight: Akron Brass FireCalc Pocket Computer Welcome to a special Monday Edition of Eddie’s Math and Calculator blog. Thi...