More on the HP 35s Calculator

I have kept some notes as I was performing an stats operation on a list of numbers. Most of the time the interface on most calculators is intuitive enough that you don’t really need the manual to do things like stats or common operations on the scientific calculator. The Sharp calculator has data entry for stats refined to the point where you can return to any list member and correct the entry.

Stats on the HP35s is of the “old school” variety, with an important change: the calculator is always in single variable stats mode. Hitting the “Sigma+” key on the bottom of the keypad is enough to begin your entry, and this means you can interrupt your data entry at any point and to any other calculation that you need to do. This is true in both RPN and Algebra mode.

One annoying feature I found is that if you have a syntax error, there is no “clear error” or “clear” button that will instantly remedy it. All attempts to clear the display have to be done through a “clear” button that is made as a second function to the backspace key (the backspace key is the other way to clear your error, one character at a time, using the arrow keys to help you). To clear everything (“clear/all”) requires you to go through 2 layers of menus.

What is old is new: RPN on the HP 35s Scientific Calculator

I saw the 35s for the first time in a Staples store just this year, though the calculator has been around in University bookstores since 2007. I bought mine on sale, being listed at $99.00 full price. When it came out in 2007, I heard that it came with a zippered pouch to store the calculator in. Mine, supposedly the 2011 model, came with a vinyl pouch that was open, with rather stiff elasticized cloth bands on the sides, making the calculator difficult to actually place in its pouch, especially the first time it was used.  Once in the pouch, it was difficult to take back out of its pouch. The calculator feels light when held in one’s hand. I’m not sure why I noticed that. Somehow I thought it would feel more substantial, given all of the functions and programmability, and the 800 or so memories that it boasts of.

2012 will be the 40th anniversary of the scientific calculator. HP made the world’s first scientific calculator in 1972, and it was an RPN calculator with no algebraic mode. Anyone who has tried to program in a serious way would appreciate that RPN is easier to program for (from the manufacturer’s point of view), because of its reliance on a memory model called “stacks”, which most computer science undergraduates know about, by second year at the latest. While the act of doing things algebraically might seem easier to us humans, programming a calculator to think in terms of human algebra is more difficult than you would think. It takes a computer many more steps, and thus it is much slower than RPN in terms of processor time. It was probably not until the early 1990s that calculators were capable of anything close to human-style algebra, and only recently have processors become so small and fast that the speed of the algorithm is not really as important as it used to be. But human speed might be. To those who take the time to understand how RPN works, and how the 35s implements stacks, RPN is still faster for humans to perform calculations.

Many of the features on the 35s are common on much cheaper calculators: statistics, regression, vectors, mixed fractions, complex numbers, numberical integration, numerical differentiation, a linear tramadol buy online usa solver, and there are much cheaper calculators that can solve single-variable polynomials up to order 3. I own a $5.00 calculator that can solve linear systems in up to 3 unknowns. Also, there are too many features on the “new” HP 35s that are tied up in menus, which is something that turned me off from using TI calculators. The only tangible attraction I can think of for this calculator is likely to be its programming mode. The 35s is among the very few non-graphical calculators around today that one can write programs in.

Playing with it a bit, I find that scientific notation seems to work up to 10500, meaning the computation of factorials can go to unheard-of extremes, even going beyond the capacity of an Excel spreadsheet. I was able to find, to several sig figs, the value of 253!, wheras Excel 2007 craps out past 125!. This means that this calculator is particularly powerful for performing permutations (nPr) and combinations (nCr).

I have lost my touch with the use of stacks from my programming days, but it looks like the calculator does a lot of pushing and popping, even in the middle of the stack. In addition, it only seems to perform calculations on the stack 2 at a time, even though the stack can accomodate 4 numbers. When you enter numbers, it’s like “pushing” numbers on to the bottom of the stack. You enter a number, and the stack moves up. If  you enter two numbers then add them, the stack moves down and the result of the addition is entered in the immediate register in the stack, called “x”.  The true implemtnation of this is that, for the registers t, z, y, and x, t gets its number copied to z, z copies to y, and y copies to x. This results in a duplication of t in the stack. If a “+” is pressed when a stack contains the numbers “1 2 3 4”, it adds only 3 and4, then the top 2 registers shift down and the result of adding 3 and 4 is placed in “x”: “1 1 2 7” becomes the resulting stack. The “1” and “2” shift down, but in reality, the memopry register values are just copied.

The TI-NSpire Programming Language

A couple of changes to the programming language, including the addition of a host of commands and libraries, and the Request "x",y  command, have made the programming experience more pleasant on the Nspire. Finally, something that comes a giant step closer to behaving like a normal programming language.

The assignment command using “STO>” doesn’t work the way it used to, but I wasn’t aware that the Nspire had a Pascal-style “:=” for variable assignment.

The spreadsheet could be populated once, but re-running the program to populate the spreadsheet with different data lead to the Nspire becoming confused, and garbage buy tramadol usa data winding up on the spreadsheet. Deleting the spreadsheet, and re-inserting the array names once more on the tops of the columns resulted in the new array values updating themselves automatically on the spreadsheet.

There needs to be a way to declare and name a spreadsheet programmatically, and I don’t see a way yet. There also needs to be a way of disposing of the spreadsheet or clearing a spreadsheet, inside of the program. Again, I don’t know of a way to do that yet.

Once I get the code perfected a little more, I’ll post it.

Programming on the TI-84, Nspire and Nspire CAS

The TI-Nspire comes with a great deal of programming tools, but after many updates, it is still crippled by the lack of an input statement.

Without input, what you have is a collection of functions. You have to run and re-run functions with new parameters each time to enter a list.

Of course they provide their spreadsheet, which requires the user to tab to a new cell after each input. Then to go to the first cell of the new row, you need to arrow down then left for several arrow presses until you return to the first cell of the row below. Once all your data is input, TI says you are given two choices: either run your function on your spreadsheet (the output going into a new column), or run your program in calculator mode, using the variables from your spreadsheet as parameters.

Running a TI-84 with an input command, I input data into multiple lists, pressing only the enter key until the end of the list (list length was the first data entered). These lists ended up in the table, namely L1 to L6. To correct my input, I could always return to the table and correct  anything I needed. If the list consisted of multiple items for each row in a table, that was no problem. The program I wrote took care of the tabulation and did the calculations on columns, storing the output in new columns, as the code below illustrates.

I can only see the Nspire becoming most useful after the raw data is fully tabulated. I can see how formerly complex calculations and metadata generation becomes greatly simplified once the table is in place, using the Nspire. I have appreciated how cutting and pasting, and the invocation of spreadsheet-based functions greatly resemble that of Microsoft Excel. Before we appreciate the math power it holds, it is comparatively a slog, with having to navigate back and forth across a spreadsheet.
__________________________
This is a TI-84 Program to input student marks based on 4 categories and calculate statistics on class evaluations. Indentation is for presentation only. You cannot indent code in the TI-84.

VARIABLE DICTIONARY
K: Knowledge out of            A: Application out of
T: Thinking out of             C: Communication out of
N: # of tests                  I: Counts test #
L: Knowledge mark              B: Application mark
U: Thinking mark               D: Communication mark
Z: Used in calculating student's percentage
Y: Amount of mark accounted for so far
L1, L2, L3, ... L6
   ... arrays which hold raw scores or mid-stage calculations,
   each array element accessed through counter I. These are the
   lists stored and tabulated as they appear on the TI-84.

PURPOSE:
This program attempts to convert the 4-mark grade awarded to
students to a percentage overall grade. While many teachers
consider this a "no-no", students appreciate it, and have
a better feel for what the mark means.

If the user chooses not to enter a certain category, then s/he
should where can i buy generic viagra online from canada enter "0" when prompted at the beginning for what that
category is out of. For example, if the teacher chooses to omit
the category "Application", then s/he should enter "0" in response
to

     AP OUT OF? 0

The user is never prompted for an application mark again.

This program allows for missing sections. Up to 3 of the four
categories can be missing and an adequate percentage will be
calculated, assuming:
     Knowledge 30%
     Application 30%
     Thinking 20%
     Communication 20%
PROGRAM: MARKS

Clear Entries
ClrAllLists
Input "NO OF TESTS? ", N
Input "KN OUT OF? ", K
Input "AP OUT OF? ", A
Input "TH OUT OF? ", T
Input "COMM OUT OF? ", C
For(I, 1, N, 1)
   0->L
   0->B
   0->U
   0->D
   0->Y
   0->Z
   If (K>0)
      Then
         Input "K? ", L
         (L/K)*.3->L1(I)
         L1(I)->Z
         .3->Y
   End
   If (A>0)
      Then
         Input "A? ", B
         (B/A)*.3->L2(I)
         Z+L2(I)->Z
         Y+.3->Y
   End
   If (T>0)
      Then
         Input "T? ", U
         (U/T)*.2->L3(I)
         Z+L3(I)->Z
         Y+.2->Y
   End
   If (C>0)
      Then
         Input "C? ", D
         (D/C)*.2->L4(I)
         Z+L4(I)->Z
         Y+.2->Y
   End
   Disp "MARK: ", (Z/Y)*100
   (Z/Y)->L5(I)
End
(L5*100)->L6
1-Var Stats L6

UPDATE: I had to type in the above code by hand, since no Windows-based editor is available for this coding, and there is no editable file for this code that I am aware of, except through the calculator itself. In the process, I spotted some errors, which have now been corrected.  In the old code, “Y” appeared to be counting a possible total of 1.2 instead of 1. Also, the Communication mark was based on 30% instead of 20%.  Since I have no serious intention to maintain the code on this blog entry, send me a comment if you have any other difficulties with this code.

~~~~~~~~~~~~~~~~~~~~~~
One of the serious disadvantages of programming the TI-84 is the utter lack of syntax structuring for the purposes of readability, such as indentation. Notice also that the IF statement takes up two lines. THEN seems to be treated as though it marks the beginning of a statement block, ended by END.

But, I suppose in the service of reducing the keyword count, END seems to end any statement block, such as a FOR loop. There is also another problem with not being able to move backward to correct data until after the program has finished execution.

While readability was an issue with the TI-84, I am still willing to live with that for the want of an INPUT statement in the NSPIRE. This code allows for efficient keying in of long lists of data.

The TI-Inspire is not what it is cracked up to be

84_pad_max192wThis is the TI-Nspire, the calculator that promises to foment lazier minds in students than ever before. I teach math, and I look at all these new calculators with jaundiced eye. Ever see the new caclulators these days (non-graphing) which can come up with exact answers to sum and difference functions of trig angles? This is stuff I want my students to do. Those calculators are banned from tests in our school.

But, OK, I’ll pull in my horns for the moment. This next-generation calculator, which has an interchangeable keyboard so it can also emulate a TI-84+, does most of the TI-84 operations with better graphics, but with more menus and steps, with some new features thrown in.

But there is missing stuff in the Inspire which the TI-84 makes obvious. For one thing, there is no “startup” program. That seems trite, but it is not. In a school setting, a startup program can put an image on the screen which can identify the calculator number and the school name. It is hard to change or erase, which makes it a good addition to a physical marking on the calculator (an etched serial number on the case, for example) to identify the calculator and keep easy track in case a student may carry one of these things and it gets mixed up (this happens sometimes). My personal graphing calculators can do this (TI-84+ and TI-83+), all except the TI-Nspire. The TI-84+ “personality” of the Nspire can do it, except that it flashes the image on for only a split second. It doesn’t wait for a keypress.

But what is more pressing is that the Nspire has no way (yet) to find the intersection of two graphs. The method I am using to find this, and the x-intercept does not seem like a surefire method, and does not seem as intuitive.

The programming language with the Inspire is more sophisticated than with that of the TI-84. It allows for user-defined functions, for example. But it does not have an “INPUT” command to my knowledge. The TI-84 has one, but not the Nspire. The NSpire has an I/O menu, and the only selection there is “DISP”, which is like BASIC’s PRINT command. Without a means for input from the keyboard, the programming functions are pretty useless, unless you want to call up one of their spreadsheets and fill things in manually. In the TI-84, I would be prompted for a number of different inputs and I would allow the calculator to figure out which row/column my input could go in. With the TI-84, I could program statistics commands, fill in tables, and do row/column calculations, all inside my program. I would often use the last row in the table after the program executed to give a bar chart of that data. This has been very useful to get a picture of class mark distributions, for example.

I have to amend what I have said earlier that there is no way to run the code. You can run the code in calculator mode, but without an INPUT statement, you need to pass parameters to it as if it were a function. Of course, I would guess the NSpire’s functions (which are new to the NSpire) work the same way, meaning there is probably little syntactic difference between calling functions versus programs in my view. I have written my first function and ran it in calculator mode, and it works as advertised. But no input.

So far, they are making customers wait for a long time before they put out these new features. And so far, I consider the lack of programmability make the NSpire less useful than the TI-84. The Nspire has been available to the mass market for about 2 years, and it looks like we are going to be made to wait a lot longer for features like these. What is the reason they put out a $200 product that is only half-finished in many areas? I purchased it expecting it to be at least as complete in itself as my other TI calculators. But I have come to the conclusion that it is still a work in progress.

For now, I am not shelving my TI84+ just yet, and am still doing most of my math on it. And for the record, I don’t feel totally ripped off. After all, they do update their operating system and allow us to update our calculators with new firmware upgrades. And some of those upgrades will change the way you do things before the firmware upgrade. Maybe one of these days, one of those changes will be the inclusion of an input statement, and the making of a more genuine programming language.

I attended a conference on the TI-NSpire recently, and one thing I heard teachers say is that kids pick up on the technology a lot faster than us. But of course, there is a motivator. The calculator just hands you the answers, which relieves the student of all the bother of having to think. Well, if you’re a kid who ought to be learning the concepts, that must feel REALLY motivating. Thinking is hard. Pushing buttons is easy. The kids that they had there helping us out at the conference were as stumped as I was when they were presented with my NSpire, having only worked on the CAS. Eventually, I got it to do most of the things we were doing. I hope they were being paid to be there. Looks like they were there as cheap, untrained labour.

At any rate, as for us teachers, we are really focusing on the concepts. My concern is whether this new gadget will deliver the concepts to them better than if I worked examples out by hand on the board. My focus is not on the calculator, it’s on the curriculum. We can change questions to make people think about what the calculator is doing and why, but we are moving away from doing the algebra. The question “why” is a good one, and I make sure I get people to think about things like “what does the log of a number give us?” and so on, every chance I get. But people always need to be drilled on algebra, all the time, every day. Letting a caclulator do this work for us can give the impression that it isn’t as important as it used to be. Algebra is important, even if you will never use it again, because it helps kids develop analytical skills needed in everyday life.