Showing posts with label United States. Show all posts
Showing posts with label United States. Show all posts

Monday, August 8, 2022

Texas Instruments: TI-36X Pro and TI-30X Pro Mathprint

 Essentially, the Texas Instruments TI-36X Pro and the TI-30X MathPrint are functionally equivalent.  What makes the two calculators different?


*  The TI-36X Pro is sold in the United States and in lot of the world, with the TI-30X MathPrint is sold primarily from Europe.  I ordered my TI-30X Pro MathPrint from the United Kingdom.  


Product pages from Texas Instruments:


TI-36X Pro (United States and Canada)

https://education.ti.com/en/products/calculators/scientific-calculators/ti-36x-pro


TI-30X MathPrint (Denmark, in Danish):

https://education.ti.com/da/products/calculators/scientific-calculators/ti-30x-pro-mp#specifications


Australia has a TI-30XPlus MathPrint, which is styled like the TI-30X Pro MathPrint, but without calculus functions.

https://education.ti.com/en-au/products/calculators/scientific-calculators/ti-30x-plus-mp?category=overview


*  Thanks to the body of the calculator being curved, the TI-36X Pro is slightly bigger than the TI-30X Pro MathPrint. 


*  The screen on the TI-36X Pro is a curved trapezoid, while the screen of the TI-30X Pro MathPrint has is rectangular.  


*  The TI-36X Pro has a circular arrow keypad while the TI-30X Pro MathPrint has a rectangular arrow keypad.  


* The TI-30X Pro Math print has black characters, while the TI-36X Pro has blue characters.


* The font on the keys of the TI-30X Pro Math are larger than than the font on the TI-36X Pro's keys.


Here are some pictures.













Either calculator is worth buying.  You  can see my review of the TI-36X Pro from 2011 here:

P.S. I still wish the TI-36X Pro/TI-30X Pro MathPrint had an alpha key instead of one key to press multiple times to get different variables.  That is my biggest gripe. 

Eddie



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






Saturday, May 15, 2021

Retro Review and Comparison: TI-82 Advanced

 Retro Review and Comparison: TI-82 Advanced




I can officially say that I have a French calculator.  


Quick Facts:


Models:  TI-82 Advanced

Company:  Texas Instruments

Manufactured: 2015-2021

Type:  Graphing

Battery:  4 AAA

Country: France


Keyboard


All the TI-82 Advanced is a French calculator, where the keys and functions are in French.  Examples include:


French:  suppr,  English:  delete


French:  dessin,  English:  draw


French:  annul,  English: clear


French:  rappel,  English: recall



I like the how the keys respond and how comfortable the keys feel.  The screen is a monochrome screen but the contrast between the screen and its text.  


More Like the TI-84 Plus


The TI-82 Advanced is pretty much the equivalent of the TI-84 Plus.  I put together a comparison table between three calculators:


*  The basic TI-82 (United States)

*  TI-82 Advanced

*  TI-84 Plus  (monochrome screen)


The table lists the commands available in several menus including Lists, Distributions, Program Editing, and Variables.  You can download the comparison here.  


Python to Come


In the Fall of 2021, Texas Instruments will release the next version of the TI-82 Advanced: the TI-82 Advanced Edition Python.  The new TI-82 Advanced will retain the classic TI-82 casing, including being powered by AAA batteries, but will have a color screen and have a Python programming mode. 


You can read the about the TI-82 Advanced Edition Python here:


https://education.ti.com/fr/produits/calculatrices/graphiques/ti-82-advanced-edition-python  (French)


https://tiplanet.org/forum/viewtopic.php?p=259509#p259509 (French)


Eddie 

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


Thursday, October 10, 2019

HP 41C/DM 41: Halloween and Thanksgiving - Calendar Calculations

HP 41C/DM 41:  Halloween and Thanksgiving - Calendar Calculations

Introduction 



We are about to enter the annual holiday season, and it's can be hard to remember when all the holidays.  Here is a way to determine what date Thanksgiving will be on this year, and all you have to know is what day of the week Halloween falls on.

Halloween is celebrated on October 31.  Halloween is celebrated on a fixed date, while Thanksgiving is celebrated on a fixed day of the week.

In the United States, Thanksgiving is on the fourth Thursday in November.  Therefore the only dates Thanksgiving in the United States is between November 22 and November 28.

In Canada, Thanksgiving is on the second Monday in October, which lands the possible dates between October 8 and October 14. 

Determine The Date of Thanksgiving Knowing What Day of the Week Halloween Is On

The first step is to give each day a numeric value:

Sunday: 0
Monday:  1
Tuesday:  2
Wednesday:  3
Thursday:  4
Friday:  5
Saturday:  6

To determine what date Thanksgiving falls on in the United States:

1.  Let H be the numeric value for the day Halloween falls on (see the above chart). 
2.  Subtract 4 from H.
3.  If the result is zero or negative, add 28; otherwise, add 21. 

Note:  The following programs could address alternative approaches given what the command set of the HP 41C/DM 41 allows us to do. 

HP 41C/DM 41 Program:  H>T

01 LBL^T  H>T
02 4
03 X<>Y
04 -
05 X>0?
06 GTO 01
07 7
08 +
09 LBL 01
10 21
11 + 
12 RTN

To determine what date Thanksgiving falls on in Canada:

1.  Let H be the numeric value for the day Halloween falls on (see the above chart). 
2.  Subtract H from 7. 
3.  Subtract 3 from the last result.
4.  If the result from Step 3 is zero or negative, add 14; otherwise, add 7.

HP 41C/DM 41 Program: H>CT

01 LBL^T H>CT
02 7
03 X<>Y
04 -
05 3
06 -
07 X>0?
08 GTO 01
09 7
10 +
11 LBL 01
12 7
13 + 
14 RTN

Now, let's go the other way.

Determine The Day of the Week Halloween Knowing the Date of Thanksgiving

The first step is to give each day a numeric value:

Sunday: 0
Monday:  1
Tuesday:  2
Wednesday:  3
Thursday:  4
Friday:  5
Saturday:  6

To determine the day of the week Halloween falls on given the date of Thanksgiving (United States):

1.  Let T be the date of Thanksgiving.
2.  Subtract 21 from T. 
3.  Subtract the result from Step 2 from 4.  If the number is negative, add 7.  See the above chart to determine the Day of the Week.

HP 41C/DM41 Program:  T>H

01  LBL^T T>H
02 21
03 - 
04 4
05 X<>Y
06 -
07 X<0 font="">
08 GTO 01
09 RTN
10 LBL 01
11 7
12 + 
13 RTN

To determine the day of the week Halloween falls on given the date of Thanksgiving (Canada):

1.  Let T be the date of Thanksgiving.
2.  Subtract T from 11.  If the result is negative, add 7.  See the above chart to determine the Day of the Week.

HP 41C/DM41 Program:  CT>H

01 LBL^T CT>H
02 11
03 X<>Y
04 -
05 X<0 font="">
06 GTO 01
07 RTN
08 LBL 01
09 7
10 +
11 RTN

Are you ready for the holiday season?  I'm not sure I am.  Let's have fun,

Eddie

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

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.

Saturday, November 19, 2016

HP Prime and TI-84 Plus: Method of Equal Proportions: Number of U.S. Representatives

HP Prime and TI-84 Plus:  Method of Equal Proportions:  Number of U.S. Representatives 

Introduction

The 2016 United States Elections still fresh on the minds of some Americans, even with talk of repealing the Electoral College.  But how does the Electoral College work? 

Each of the 50 states receives a set amount of electoral votes, which is based on the number of House Representatives and Senate members.  Each state gets two Senators. The number of House Representatives is determined by popular.  Every ten years, specifically 1990, 2000, 2010, 2020, and so on, the United States takes nationwide census.  That population becomes the basis of determining the number of House of Representatives.   Currently, there are 435 members of the House.

After the election, each state gives the set number of electoral votes to the candidate who wins the popular vote in that state.  For example, California, where I’m from, has 55 electoral votes.  If Candidate A wins by popular vote in California, that candidate gets 55 votes.  The exceptions are Maine and Nebraska, which use a congressional district method. 

Note:  In the Electoral College, 3 additional votes goes to the District of Columbia.  However, since D.C. is not a state, it won’t get seats in the House of Representatives. 

The Method of Equal Proportions: Determining the Number of Seats

In order to represent the population as fair as possible, methods must be used to distribute the number of seats.  The method currently used is the Method of Equal Proportions, which has been in use since 1940.

The first step is to give each state one seat at the House of Representatives.  For the United States, after each state gets one seat, there are 385 seats to assign.

The population of the states are recalculated by the following formula:

A_n = P / √(m * (m + 1))

where P = the state population, and m = the next potential seat (so for example, if the state currently has 5 seats, m = 6)

A recursive method, the method used in the program EQPROP is used:

A_1 = P / √2

A_n+1 = A_n * √(n/(n+2))

where n = the number the seats the state currently has

Example:  Small Hypothetical Nation

Suppose we have a small hypothetical nation, called the Country of Celestia that consists of five states.  The government is similar to the United States, having both a House and Senate.  Each state has 2 Senators.  The five states have the following population for which 24 seats need to be distributed:

Virgo
148,000
Andromeda
107,500
Orion
95,500
Sagittarius
95,000
Pegasus
93,000
Total
539,000

As the first step, each state gets 1 seat.  That means there are 19 seats remaining. (24  - 5)  I am going to use the recursive definition.

We need to adjust the population (to determine the priority number) by dividing each population by √2.  Note:  calculations in this example are rounded to the nearest integer.

Virgo
104,652
1
Andromeda
76,014
1
Orion
67,259
1
Sagittarius
67,175
1
Pegasus
65,761
1

The next seat (6 out of 24), will go to Virgo because Virgo has the highest adjusted population.  Then Virgo’s next adjusted population will be:  104,652 * √(1/3) = 60,421

Virgo
60,421
2
Andromeda
76,014
1
Orion
67,259
1
Sagittarius
67,175
1
Pegasus
65,761
1

Seat #7, goes to Andromeda, because Andromeda now has the largest adjusted population at 76,014.  Adjusting the population:  76,014 * √(1/3) = 43,887, and Andromeda gets another seat.

After 7 seats, this is what the adjusted population looks like:

Virgo
60,421
2
Andromeda
43,887
2
Orion
67,259
1
Sagittarius
67,175
1
Pegasus
65,761
1

We continue:

Virgo
Andromeda
Orion
Sagittarius
Pegasus
Seat #
Adj. Pop.
# Seats
Adj. Pop.
# Seats
Adj. Pop.
# Seats
Adj. Pop.
# Seats
Adj. Pop.
# Seats
8
60421
2
43887
2
38832
2
67175
1
65761
1
9
60421
2
43887
2
38832
2
38784
2
65761
1
10
60421
2
43887
2
38832
2
38784
2
37967
2
11
42724
3
43887
2
38832
2
38784
2
37967
2
12
42724
3
31033
3
38832
2
38784
2
37967
2
13
33094
4
31033
3
38832
2
38784
2
37967
2
14
33094
4
31033
3
27458
3
38784
2
37967
2
15
33094
4
31033
3
27458
3
27424
3
37967
2
16
33094
4
31033
3
27458
3
27424
3
26847
3
17
27021
5
31033
3
27458
3
27424
3
26847
3
18
27021
5
24038
4
27458
3
27424
3
26847
3
19
27021
5
24038
4
21269
4
27424
3
26847
3
20
27021
5
24038
4
21269
4
21243
4
26847
3
21
22837
6
24038
4
21269
4
21243
4
26847
3
22
22837
6
24038
4
21269
4
21243
4
20796
4
23
22837
6
19627
5
21269
4
21243
4
20796
4
24
19777
7
19627
5
21269
4
21243
4
20796
4

Final Distribution for Celestia (our example):  Virgo, 7 House seats, Andromeda, 5 House seats, Orion, Sagittarius, and Pegasus get 4 each.

On to the programming!

The Program EQPROP

The program EQPROP takes two arguments:  the list of populations, and the number of House of Representative seats to be assigned.  The program assumes that two Senators will also be assigned.

Output:  A matrix of three columns:
Column 1:  The population of each state.  The population is sorted in descending order.
Column 2:  The number of House Representatives.
Column 3:  The number of House Representatives plus the 2 senators.

For the TI-84 Plus:  L1 is used as the population list, lists L2, L3, and L4 are used for calculations, and the results are returned in Matrix [A].

HP Program EQPROP

EXPORT EQPROP(lp,n)
BEGIN
// Method of equal proportions
// 2016-11-18 EWS
// population, no of seats

LOCAL la,s,lr,k,m,p,w;

// initialization
lp:=REVERSE(SORT(lp));
la:=lp/√2;
s:=n-SIZE(lp);
lr:=MAKELIST(1,X,1,SIZE(lp));

// loop
FOR k FROM s DOWNTO 1 STEP 1 DO
m:=MAX(la);
p:=POS(la,m);
w:=lr(p);
la(p):=la(p)*√(w/(w+2));
lr(p):=w+1;
END;

// output, organize matrix
// [population, senate, + house]
LOCAL l2,m2,l3;
l3:=lr+2;
l2:={lp,lr,l3};
l2:=TRN(list2mat(l2,3));
m2:=l2(1);
RETURN m2;

END;

TI-84 Plus Program EQPROP

"EQUAL PROPORTIONS"
"2016-11-18 EWS"
Input "POP. LIST: ",L
Input "NO. OF SEATS: ",N
SortD(L)
L→L
N-dim(L)→S
L→L
Fill(1,L)
L/√(2)→L
"LOOP"
For(K,S,1,­1)
max(L)→M
"POS"
1→P
While L(P)≠M
1+P→P
End
"REST"
L(P)→W
L(P)*√(W/(W+2))→L(P)
W+1→L(P)
End
"OUTPUT"
L+2→L
List>matr(L,L,L,[A])
Pause [A]


Sources:

Burnett, Kristin D.  “Congressional Apportionment:  2010 Census Briefs”  U.S. Census Bureau.  November 2011.  Download the PDF file here:  http://www.census.gov/library/publications/2011/dec/c2010br-08.html

Wikipedia   “Electoral College (United States)”  https://en.wikipedia.org/wiki/Electoral_College_(United_States)  Retrieved November 16, 2016

Wikipedia “United States Congressional Apportionment”  https://en.wikipedia.org/wiki/United_States_congressional_apportionment#cite_note-22   Retrieved November 16, 2016

This blog is property of Edward Shore, 2016


RPN: DM32 and DM42: Stopping Sight Distance (Metric)

RPN: DM32 and DM42: Stopping Sight Distance (Metric) The Stopping Sight Distance Formula – Derivation The stopping sight di...