The Museum of HP Calculators

HP Forum Archive 18

[ Return to Index | Top of Index ]

Programming Programmable Calculators
Message #1 Posted by Stefan Vorkoetter on 2 Jan 2008, 11:35 a.m.

In a thread about the TI-89 vs. HP-50g, Ed Look wrote (edited by me):

Quote:
I may be many, many years out of date, but really, a good programmable scientific calculator with decent memory is all you really need in college.

... as long as it has the right functions on the keyboard, is programmable, and has enough memory for normal calculation and programming, it'll do!


This got me thinking: Does anyone actually program their programmable calculators any more? By "anyone", I don't really mean the people on this list, but the real-world student/scientist/engineer who buys an HP-33s, HP-35s, or TI-whatever scientific (not graphing) programmable.

The majority of the programming that I do on any of my programmables is little 4-liners to multiply a bunch of numbers by the same constant:

LBL A
someConstant
x
RTN

In short (very short), the kind of program I most commonly write overcomes one of the few disadvantages that a calculator has compared to a slide rule.

What's interesting about this is that programs like these can be written on even the most pathetic programmable, without any advanced programming features like labels, branching, conditional tests, subroutines, flags, etc.

That's not to say that I don't write longer programs (like the curve fitting and matrix tool programs on my web site), but those are just "for the fun of it", not because I have a problem to solve. Writing calculator programs for the fun of it doesn't really qualify as "real-world". :-)

Stefan
http://www.stefanv.com/calculators

Happy 11111011000b

Edited: 2 Jan 2008, 11:41 a.m.

      
Re: Programming Programmable Calculators
Message #2 Posted by Don Shepherd on 2 Jan 2008, 12:42 p.m.,
in response to message #1 by Stefan Vorkoetter

Stefan, that's an interesting question and should solicit some interesting responses to liven this forum up a bit.

Almost every program I have written for calculators as been "for the fun of it." But that's fine. I believe that scientists and engineers always have desktop PCs these days to do the real computing. Outside of the members of this community (HPMUSEUM), I'd bet that not more than a few hundred or thousand people worldwide program their calculators. I could be wrong.

As a teacher, I wrote a program (on my TI-83) to randomly select a kid to call on during class. I thought my students would appreciate the "fairness" of it. They hated it! Go figure.

      
Re: Programming Programmable Calculators
Message #3 Posted by Nenad (Croatia) on 2 Jan 2008, 1:28 p.m.,
in response to message #1 by Stefan Vorkoetter

My son, who is in the senior grade of high school, has the following two programs in his HP32SII (brown bezel):

1. Quadratic equation

2. Linear system 2x2

We developed the two programs together.

In my office the only program I have in my calculator is the calculation of required capacity of bilge and firefighting pumps, given the dimensions (L, B, H) of the ship. That is a very simple sequence (not a system) of three equations.

For all other calculations I perform on a daily basis (shaft dimensions, propeller dimensions, shafting alignment, vibrational frequencies, etc.) I have prepared MS Excel 97 worksheets, combined with VBA. The most important advantage over the calculator is that when I enter the data, the report is finished and can be printed, filed, etc.

      
Re: Programming Programmable Calculators
Message #4 Posted by Geir Isene on 2 Jan 2008, 2:21 p.m.,
in response to message #1 by Stefan Vorkoetter

My approach is:

1. I love programming, but have very little time for it.
2. I love programmable calculators, preferably HP. The portability of a calculator allows for programming almost anywhere, including in the bathtub.
3. I want easy access to programmability. More so than on a PC.
4. I mostly settle for one of my HP-41CX's and with expansions such as the NoV-32 and HP-IL, it is a capable little chap.
5. I try to find as much use for the calc as I can to sattisfy 1 & 2 above.
6. I therefore use it as an alarm clock, PDA, note taker, TVM calc, and any other excuse to use it as much as possible.
7. Now I've grown fascinated by M-Code and are reading up on that :)

Edited: 2 Jan 2008, 2:22 p.m.

            
Re: Programming Programmable Calculators - M-Code literature
Message #5 Posted by PeterP on 3 Jan 2008, 12:44 p.m.,
in response to message #4 by Geir Isene

Geir,

Are you talking about M-Code for the 41? I'd be interested in what kind of literature you are finding. I do have access to Ken's and Daniel's book, both of which I found to be excellent. I also copied all/most articles I could find from the PPC journal (and some of its successors) that are around M-Code. If you were to know of any additional literature, I'd be most interested to learn about it.

Cheers

Peter

                  
Re: Programming Programmable Calculators - M-Code literature
Message #6 Posted by Geir Isene on 3 Jan 2008, 1:37 p.m.,
in response to message #5 by PeterP

You are ahead of me :)

I have read the HEPAX manual and started "M-Code for beginners"...

                        
OT Re: Programming Programmable Calculators - M-Code literature
Message #7 Posted by PeterP on 4 Jan 2008, 9:50 a.m.,
in response to message #6 by Geir Isene

Thanks Geir, let me know how it goes, we can always exchange literature and ideas off-forum via email.

Cheers

Peter

      
Re: Programming Programmable Calculators
Message #8 Posted by Mark Storkamp on 2 Jan 2008, 2:54 p.m.,
in response to message #1 by Stefan Vorkoetter

Quote:
Does anyone actually program their programmable calculators any more? By "anyone", I don't really mean the people on this list,

I guess that disqualifies me from answering. (disqualify maybe, but not stop :-)

Now days I mostly just put equations into my 35s and let it solve it. Back with my 34C and then 41C I would write a quick sequence of keystrokes to solve equations.

The single most extensive program I've written for a calculator is for the 49g+. I use it to log measurements on parts I'm inspecting, and to recall measurements to use in calculations. Then after all the parts are inspected I plug it into my PC and dump out the data into a spreadsheet. It's advantage over using a PC is it's portable. I can be standing at a machine, in an inspection room, or at someones desk and have it available.

            
Re: Programming Programmable Calculators
Message #9 Posted by Ed Look on 2 Jan 2008, 9:09 p.m.,
in response to message #8 by Mark Storkamp

The venerable old 34C actually prolonged for me the use of programming in anything, and kept me at least somewhat interested in it as a tool for solving small practical problems (I'm not a theorist). Funny thing, I really never programmed the 32SII much at all, but very heavily on the 34C, and later on the 48G/G+ and 33s. As I said in another post in this thread I'll either port or write some routines on the 35s, now that I'm using it primarily.

      
Re: Programming Programmable Calculators
Message #10 Posted by DaveJ on 2 Jan 2008, 4:58 p.m.,
in response to message #1 by Stefan Vorkoetter

Quote:
This got me thinking: Does anyone actually program their programmable calculators any more? By "anyone", I don't really mean the people on this list, but the real-world student/scientist/engineer who buys an HP-33s, HP-35s, or TI-whatever scientific (not graphing) programmable.

I mentioned this before, but I don't personally know *anyone* in my industry (electronics design engineering) who actually uses a programmable calculator, and very few who even own one.

Those that do own one only got it because they needed/wanted it for their uni course. They have all since switched to non-programmable scientific calcs like the Casio's and TI's because that's all that needed for everyday use, and found their programmable/graphing calc to be too cumbersome for everyday use.

I know this is totally the opposite to other industries like surveying and some areas of mechanical design.

Dave.

      
Re: Programming Programmable Calculators
Message #11 Posted by Norris on 2 Jan 2008, 7:27 p.m.,
in response to message #1 by Stefan Vorkoetter

Quote:
This got me thinking: Does anyone actually program their programmable calculators any more?

Think about it like this: does anyone actually buy software for programmable calculators anymore?

People used to. There were dozens and dozens of specialized applications pacs, ROM modules, solutions books, etc. for the HP-67 or HP-41 series -- some from HP and others from third-party vendors. You could even order an optional "Solutions Handbook", with useful programs, for an entry-level model like the HP-11C.

Today's HP-50G is much faster and more powerful, with vastly more memory and better programming tools. But who sells cool 50G software?

In fact, commercial HP calculator software does still exist, but only for two applications that I know of:

1. Surveying -- where PCs are impractical, and
2. NCEES exams -- where PCs are illegal.

So the once-thriving market for commercial calculator software has almost disappeared, except in a few niche situations where PCs are unusable. The obvious implication is that calculator software is no longer valued to the extent that it once was.

Edited: 2 Jan 2008, 7:31 p.m.

      
Re: Programming Programmable Calculators
Message #12 Posted by Ed Look on 2 Jan 2008, 9:05 p.m.,
in response to message #1 by Stefan Vorkoetter

Well... ... I do!

I haven't programmed my HP-35s yet, but that's because I wrote some useful programs in my old 33s and 48G/G+. But now since I'm using the 35s more, I'll copy over or write some on it as well.

I often have to figure out quickly how many eV I have given a specific wavelength or vice versa. Instead of pulling up all those constants and calculating the same little thing each time, I just programmed the calculation (oh, thank God for the constants libraries in all those three calculators!!!). But this is similar to your three line programs (oh come on, it's not so pathetic! ;) ).

Now, here's where I need to branch, use flags, indirect addressing and registers, etc.- when I teach physical chemistry lab, I have to check whether my students correctly indexed their (simple cubic) x-ray diffraction powder patterns, so I had to come up with a program that'll automate that for me (I published it on this site in the programs section; when one day I have enough energy, I'll figure out the programs for the other basic unit cells... though the low symmetry ones will probably be... mucho tough).

Now, I can't do this on a 35s nor 33s, but I on both my 48G or 48G+ use Arnold Moy's periodic table and chemical elements data to aid in figuring out starting or target amounts of reagent or product for a reaction. I think it beats having to leaf through the CRC or some other kiloton tome. Come to think of it, I should program in the simple concentration or mass conversions as well. Why key it in all the time? This too, will be like your supershort programs, but it makes use of (sophisticated) pre-written software (written by HP calc aficionados).

And there are some other things too... but really, it should be related to your work or interests. (Yeah, I've got chess and a Star Trek game on my 48G+, too.)

But seriously, one reason why I love programmable scientifics, particularly RPNs, is because I do need to use them!

Edited: 2 Jan 2008, 9:17 p.m.

      
Re: Programming Programmable Calculators
Message #13 Posted by Karl Schneider on 3 Jan 2008, 12:07 a.m.,
in response to message #1 by Stefan Vorkoetter

Hi, Stefan --

Quote:
Does anyone actually program their programmable calculators any more?

Many previous posters made good points about this question.

What was lacking in the 1975-1985 era, of course, is today's advanced programmability in affordable and portable packages. Laptop PC's and even PDA's running spreadsheets that utilize a high-level language (e.g., MS Visual Basic) can make quick work of complicated problems. Back then, one's only practical choices were the programmable calculator and time-sharing the company or university mainframe computer.

As for a "real-world" calculator program, here's a link to one that I wrote and use on the job (engineering in power system planning):

http://www.hpmuseum.org/software/32acxfer.htm

-- KS

      
Re: Programming Programmable Calculators
Message #14 Posted by Stuart Goldberg on 3 Jan 2008, 5:26 a.m.,
in response to message #1 by Stefan Vorkoetter

Years ago, when working for Univac at the Navy Aviation Supply Office in Philadelphia, I wrote a program for my -41 to calculate optimal record size/blocking factors to use when writing files to removable disk drives. Of course, that was back in the day when a 100 MB drive was a luxury and also as big as a washing machine!

I also remember writing a program for my -16 to convert floating point numbers from Univac 1100 and 400 series computers to their decimal equivalents. I just entered the raw octal values from a memory dump into the calculator and let it convert them to decimal. very useful at the time.

At one point, my Navy counterpart ordered the card reader for his -41. When it arrived at the shipping department, they called to our operations group to let them know a card reader from HP had arrived. Our ops manager dutifully sent someone to shipping to get this card reader... with a fork-lift truck! He carefully returned the package to our office on the same forklift. Got a huge laugh from all who saw its regal arrival.

Stu

            
Re: Programming Programmable Calculators
Message #15 Posted by Mike Morrow on 3 Jan 2008, 8:59 a.m.,
in response to message #14 by Stuart Goldberg

In the late 1970s as Reactor Controls officer I programmed my HP-67 to do the moving average calculations on input data to the periodic heat balance calorimetric for a S5W submarine reactor. The output was used to adjust the readings on the reactor power indicators. These calorimetrics required ship operation at near flank speed until five sets of data all agreed within some tolerance. Normally, the math was done by hand on forms and took some time to do. With the HP-67 we were able to immediately process the input data and complete the calibration in about a quarter of the time that it normally took. The ship eventually purchased a HP-97 for this, freeing up my beloved and very expensive personal HP-67. (My HP-67 system cost me more than five percent of my total annual pre-tax military pay in 1977!) For ship navigation purposes, I programmed the HP-67 to accept range and bearing information to nearby vessels to quickly compute the closest point of approach. Thus, my HP-67's 224 step memory and mag. card storage were very valuable to me professionally.

Earlier I had programmed in some frequent coolant chemistry calculations on a TI SR-52 with PC-100 printer (purchased by the ship), in the days just before HP came out with the HP-67/97 units. We also used that system to perform calculations for equipment vibration test data.

I don't know how these things are being done today, but I could easily see a programmable calculator as still being the a darned good tool. OK...maybe a PDA would work too!

Mike

            
Similar thread from 2003 (& decoding Sperry octal dump)
Message #16 Posted by Karl Schneider on 3 Jan 2008, 2:51 p.m.,
in response to message #14 by Stuart Goldberg

Quote:
I also remember writing a program for my -16 to convert floating point numbers from Univac 1100 and 400 series computers to their decimal equivalents. I just entered the raw octal values from a memory dump into the calculator and let it convert them to decimal. very useful at the time.

Stuart --

Hey, that sounds quite familiar! Read on:

Octal dump HP-15C Program

My post is part of a very similar thread from 2003 with different participants. BTW, I also utilized the Sperry-Univac 1100 series.

-- KS

Edited: 3 Jan 2008, 11:59 p.m.

                  
Re: Univac and Burroughs
Message #17 Posted by Mike Morrow on 4 Jan 2008, 10:17 a.m.,
in response to message #16 by Karl Schneider

Quote:

...I also utilized the Sperry-Univac 1100 series.


I spent many a lovely evening in the early 1970s with the Univac 1108 at Georgia Tech. I miss those IGDM (in guard mode) terminations of my batch runs. Does Exec 8 Level 27 still live anywhere?

Georgia Tech also had another very interesting machine back then...a Burroughs B5500, the ultimate *stack* machine and Algol kingdom. When I bought my first HP in 1977 (the HP-67), its RPN logic always brought back memories of the B5500.

Mike

            
Re: Programming Programmable Calculators
Message #18 Posted by Stuart Sprott on 3 Jan 2008, 6:29 a.m.,
in response to message #14 by Stuart Goldberg

My experiance with calculators goes back to before the HP 35. The 1960s & 70s. We used Curta calculators trig tables & slide rules. As a Surveyor we used to avoid calculations as much as possible becuase it took so long.

When the Hp calculators hit the market we were blown away by there power.

My first programable calc was a HP 25. You had to reprogram it every time you turned it on. Still it seemed far out at the time.

Since then I have ownwed the following calcs.

HP25c,HP29c,HP41cx,HP41cv,HP42,HP48,HP49 & HP50.

Only the HP42,HP48 & HP50 still work.

I have always written my own programs and still get a kick out of doing it. All my programs are practical based Surveying programs, ranging from simple close programs to complex least squares programs.

      
Re: Programming Programmable Calculators
Message #19 Posted by Chris McCormack on 3 Jan 2008, 6:22 a.m.,
in response to message #1 by Stefan Vorkoetter

Quote:
This got me thinking: Does anyone actually program their programmable calculators any more? By "anyone", I don't really mean the people on this list, but the real-world student/scientist/engineer who buys an HP-33s, HP-35s, or TI-whatever scientific (not graphing) programmable.

The majority of the programming that I do on any of my programmables is little 4-liners to multiply a bunch of numbers by the same constant:


Well, I'll confess to my share of 4-liners over the years, but I'll also agree that us 'atypical' users like excuses to program anything.

On my HP-15C right now, I have (and use) a program for Time Value of Money ([payment >> loan amount] and [loan amount >> payment]), Great Circle navigation calculations (distance and initial bearing between two Lat/Long coordinates), a re-coded version of 'Battle the Dive Bomber' from _Popular_Electronics_, and an incomplete program for calculating Sunrise and Sunset times.

The TVM and Great Circle routines have actually been pretty handy/useful.

            
Re: Programming Programmable Calculators
Message #20 Posted by PeterP on 3 Jan 2008, 12:40 p.m.,
in response to message #19 by Chris McCormack

one other thought from my own history: There was a lot of learning that went on for me when writing programs 'just for fun'. My first programmable calculator was a TI??? (erased from memory) with 13 steps or so. Just enough to do a tic-tac-toe. Then came a school sponsored TI-64 (I think, horizontal one) which could do prime-number calculations when pushed. From there (through some lucky trades and a large number of students who needed tutoring) the hp41 appeared in my hand, an infatuation that continues to this day.

In my everyday work I fall quite squarely into the camp of 'very little if any real-life programming'. However I still try my luck (as I don't have enough skill) with Valentin's S&SMC's or try to learn a new calc (71b) and enjoy these 'puzzle solving' a lot.

At least for me, there was quite a bit of educational benefit in programming calculators, learning about constraint memory space, thinking 'outside of the box' and the like. It has helped me in direct ways (better programmer in higher languages like Fortran, VBA which still provides for a steady supply of bread and milk in my fridge) and indirect ways (general problem solving, analytical and structured thinking).

As for today's high-school kids, that same benefit might be accomplished by the ubiquitous PC in most households which is why the role of programmable calculators is diminishing. I could imagine a forum on a Museum of 80x86 PC's in 40 years where our kids talk about the first programs they used or wrote in 'the early days of the PC'.

Cheers

Peter

      
Re: Programming Programmable Calculators
Message #21 Posted by Martin Pinckney on 3 Jan 2008, 4:54 p.m.,
in response to message #1 by Stefan Vorkoetter

If by "programming" is meant either keystroke programming or RPL programming, for me the answer is "no".

However, If the definition is broadened to include equation-writing, then the answer is a resounding yes! So my lowly 27s, which is not "programmable", is a very powerful tool for me. Some of its more sophisticated features are very akin to programming, such as the LET and GET which work somewhat like subroutines, and IF which allows conditional branching within an equation.

I do download and use RPL programs written by others on my 48sx.

      
Re: Programming Programmable Calculators
Message #22 Posted by Steve (Australia) on 3 Jan 2008, 7:43 p.m.,
in response to message #1 by Stefan Vorkoetter

Quote:
Does anyone actually program their programmable calculators any more?

No :-(

I'm a professional programmer. I found the HP48 style of programming too hard (by which I mean that the effort required to learn it was too great compared to the payoff).

If I feel the need to do something calculator programmerish these days I use one of the following (In order of preference I'm afraid):

1) excel (more recently Open office spreadsheet) 2) I pull an HP41 from my display case and use that 3) Ditto for HP42 4) Think about using the HP95

I've often thought of carrying around my HP95 or 200 for similar stuff, but I usually have my laptop with me.

I have no qualms about using any of my HP calculators on a day-to -day basis. I've taken a 21 to work for simple stuff. The 71B is a little large for "work" use. My steep keyed bug-1 HP-41C tends to stay at home, and the few TI calculators I have are simply too fragile.

Oh, the newer ones hardly get used at all.

            
Re: Programming Programmable Calculators
Message #23 Posted by Ed Look on 3 Jan 2008, 8:37 p.m.,
in response to message #22 by Steve (Australia)

Ah, with the 48G Series AUR, and a bit of practice, it's no harder than any other programming language... and you can take the CPU and terminal with you almost anywhere you like!

                  
Re: Programming Programmable Calculators
Message #24 Posted by Steve (Australia) on 3 Jan 2008, 8:57 p.m.,
in response to message #23 by Ed Look

It might be no more difficult than any other language, but I want something simple, trivial, and almost impossible to bollocks up on *my* calculator.

The simple keystroke programmable functions of my HP41 give me that, the 48 is a PITA compared to it. Harder to use in almost all respects.

I've written code for the 48, and quite frankly I spent more time debugging it than I did debugging code on the 41.

I do have the HP41 card for the 48SX and that does a good job of making the 48 easier to use :-D

                        
Re: Programming Programmable Calculators
Message #25 Posted by Ed Look on 3 Jan 2008, 10:52 p.m.,
in response to message #24 by Steve (Australia)

Oh, I agree with you that it IS more complex than coding for a four-level stacked scientific programmable. I loved programming calculations into my old 34C via keystroke programming (which is one reason why I love using both the 33s and the 35s) and I DID have to spend serious blocks of time learning the FORTH-like or FORTRAN-like RPL of the 48G.

But these RPL programs can be so much more powerful than anything anyone can put into a 34C, 41C, or 33s type machine, as it is a fuller set of programming tools than is keystroke programming.

But for all my defense of 48G-style RPL, I too, still prefer the simplicity of keystroke programming, even if more limited, because for simpler needs, it is a much easier tool to wield.

                              
Re: Programming Programmable Calculators
Message #26 Posted by Mike Morrow on 4 Jan 2008, 10:48 a.m.,
in response to message #25 by Ed Look

Someone on this news group many years ago wisely characterized RPL as follows (more or less):

"With RPL it's easy to do hard stuff, but hard to do easy stuff."

The HP50g would seem to me to be almost perfect if:

(1) Programs could be written in the current RPL *OR* the older RPN (i.e., HP42S-type), whichever best fits the needs of the moment.

(2) They moved the /, x, -, + keys down one row and put the ENTER above the / key, the way the world deities intended them to be. :-)

Mike

      
Re: Programming Programmable Calculators
Message #27 Posted by Egan Ford on 4 Jan 2008, 12:53 a.m.,
in response to message #1 by Stefan Vorkoetter

Quote:
Does anyone actually program their programmable calculators any more? By "anyone", I don't really mean the people on this list, but the real-world student/scientist/engineer who buys an HP-33s, HP-35s, or TI-whatever scientific (not graphing) programmable.

Like many others I only program calculators for fun (any type, doesn't need to be HP). My days are busy with the design and implementation of systems for high performance computing (systems that can require megawatts of power). To relax I like to work on the other side of the computing spectrum (systems that require milliwatts of power). I like the challenge of being forced to understand something well enough to implement it on a calculator.

E.g.

  • Controlling the lights in my house with a 41CX (http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=763)
  • Setting my 71B clock with a GPS receiver (http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=746)
  • I computed the first 100,000 (not a typo) digits of PI on my 50g this evening in 15670 seconds just to see if I could. A feat first achieved by Wrench Shanks in 1961 using an IBM 7090. My 50g using a different StÝrmer algorithm did it in 1/2 the time.

I've created 15C, 48GX, and 50g programs for work, but like others I get by with spreadsheets and Perl scripts on my workstation.

Edited: 4 Jan 2008, 1:58 a.m.

            
Re: Programming Programmable Calculators
Message #28 Posted by John Keith on 4 Jan 2008, 3:35 p.m.,
in response to message #27 by Egan Ford

Quote:
I computed the first 100,000 (not a typo) digits of PI on my 50g this evening in 15670 seconds just to see if I could. A feat first achieved by Wrench Shanks in 1961 using an IBM 7090. My 50g using a different StÝrmer algorithm did it in 1/2 the time.

Cool! I'd love to see the code for that if you feel like posting it.

John

                  
Re: Programming Programmable Calculators
Message #29 Posted by Egan Ford on 4 Jan 2008, 4:57 p.m.,
in response to message #28 by John Keith

Quote:
Cool! I'd love to see the code for that if you feel like posting it.

http://www.hpmuseum.org/guest/eganford/piatan.zip

To run the code:

  1. Turn off your 50g and eject the SD card.
  2. From your PC create an "extend" directory on your SD card.
  3. From your PC unzip and put the piatan binary in the extend directory on the SD card.
  4. Put the SD card back in the 50g.
  5. Create the following UserRPL script:
    %%HP: T(3)A(R)F(.);
    \<< "Usage: Formula List, Number PI Digits >0, Speed: 0|1" \-> u
      \<< DEPTH
        IF 3 <
        THEN u DOERR
        END ROT DUP TYPE
        IF 5 \=/
        THEN UNROT u DOERR
        END \->STR UNROT \->NUM SWAP \->NUM SWAP DUP2 TYPE SWAP TYPE +
        IF
        THEN u DOERR
        END :3: "EXTEND/PIATAN" EVAL
        IF
        THEN DOERR
        END
      \>>
    \>>
    
PIATAN requires 3 arguments:
  1. Arctan Pi Formula as a list of pairs of coefficients and denominators. E.g.: Machin's Pi = 16atan(1/5) - 4atan(1/239) would be {{16 5}{-4 239}}. Stromer's would be {{176 57}{28 239}{-48 682}{96 12943}}.
  2. The number of digits. If port 0 is mostly empty and port 1 is empty, then numbers up to 200000 should be safe.
  3. The speed. 0 for normal, 1 for fast. Use 1.

There is little output while running, if you get nervous and think you hung your 50g, just press and hold a any key until it beeps (should only take a sec or two at the most). If you get a beep, its still alive, if not, you probably crashed (I didn't check for malloc failures (TBD)). If crashed just reset with paper clip, no data lost.

When done running your screen should look like this, press ON to exit.

The output will be on the root of the SD card as PIATAN.TXT. You can view it from the filer.

A screen shot suitable for framing will be on the SD card as GROB0006. To recall type:

:3:GROB0006 RCL ->OBJ

      
Re: Programming Programmable Calculators
Message #30 Posted by Stefan Vorkoetter on 4 Jan 2008, 4:48 p.m.,
in response to message #1 by Stefan Vorkoetter

I'd like to rephrase and clarify my original question:

Does anyone program their keystroke programmable scientific calculator (i.e. not RPL graphing calculator) these days for other than little 4-liners or larger programs for fun.

Or phrased another way, has the full-featured keystroke programmable calculator outlived its usefulness?

If so, then I think it unlikely that HP will ever produce the much-desired (by this forum) HP-41C successor.

Stefan

            
Re: Programming Programmable Calculators
Message #31 Posted by Egan Ford on 4 Jan 2008, 5:04 p.m.,
in response to message #30 by Stefan Vorkoetter

Quote:
Does anyone program their keystroke programmable scientific calculator (i.e. not RPL graphing calculator) these days for other than little 4-liners or larger programs for fun.
I already think you got your answer. For the majority on this forum I believe the answer is no.

Quote:
Or phrased another way, has the full-featured keystroke programmable calculator outlived its usefulness?
No. I just asked my kid if anybody at her high school writes programs to make class like easier. She said yes.

I speculate that students are the target market for on-board programmables. Easy to assume since students are the market for high-end calculators.

            
Re: Programming Programmable Calculators
Message #32 Posted by Jeff Kearns on 4 Jan 2008, 6:28 p.m.,
in response to message #30 by Stefan Vorkoetter

I am a mechanical engineer and I have only posted once or twice on this board so please bear with me for making a lengthy post. I have written (and copied/adapted) programs for my 15C and 32sii for all sorts of applications in the past 15 years, including: piping systems design (conduit flow ~50 lines) as a marine engineer, determination of drilling parameters for PCB drilling, pressure vessel design and compressed air dryer sizing. I have often found it more convenient to use the programmable calculator rather than fire up the applicable utility on the PC. Also, prior to acquiring the Advantage module for my 41C (and later the 49G+), I used my 32sII quite a bit for Statistics applications - t-Statistics, ANOVA etc. I still do in fact. These were somewhat longer than 4-liners... I still find entering data for small data sets faster on the calculator compared to Minitab or Excel.

Most of all, I have found the TVM equation to be among the most valuable formulas in my arsenal. There is a great 38-liner TVM program that I often use for each of my Pioneers (32sII, 33s, 35s). I got this program on this site but cannot remember where... It is more accurate than the 'equation'. I am including the listing below.

It is a relatively short program - 38 steps (as compared to a 108 line version for the HP 15C) that literally turns your calculator into an 'accurate' financial calculator on par with any financial calculator like the HP 12C or others. The problem with most TVM programs that just interpret the TVM equation, is that roundoff error - when the calculator rounds to 10 (HP15C) or 12 (HP32s) significant digits - causes inaccuracies when the interest rate per compounding period is quite small and/or the number of compounding periods is very large.

A classic example from the HP 15C Advanced Functions Handbook is where a lady is compensated for her thoughts for one year at $0.01/second at an annual interest rate of 11.25% compounded every second. In this case the number of seconds in a year is simplified to equal n=60*60*24*365. If you simply program the equation into your calculator (or in the case of the 32 sii, enter it as an equation), you get a total of $376,877.67 on the 15C and $334,045.36 on the 32s. The bank account, however, is found to only hold $333,783.35. This program avoids rounding error by using the natural logarithm in such a way as to not discard precious significant digits of i/n.

Here is the code for the 32s/ 32sii/ 33s/ and 35s.

Variables:

B: present value or "base" value P: payment n: periods i: interest rate in % E: end/begin modes F: future value

Equation:

B*(1+i)^n + P*((1+i)^n-1)*(1/i+E) + F = 0

(1+i)^n = e^(n*ln(1+i)) = i'

--> B*i' + P*(i'-1)*(1/i+E) + F = 0

Routine:

T01 LBL T

T02 INPUT N

T03 INPUT I

T04 INPUT B

T05 INPUT P

T06 INPUT F

T07 INPUT E

T08 RCL I

T09 100

T10 /

T11 ENTER

T12 ENTER

T13 1

T14 +

T15 LN

T16 x<>y !switch x with y

T17 LASTx

T18 1

T19 X<>Y? !x not equal to y?

T20 -

T21 /

T22 *

T23 RCL* N

T24 e^x

T25 RCL* B

T26 LASTx

T27 1

T28 -

T29 RCL* P

T30 RCL I

T31 100

T32 /

T33 1/X

T34 RCL+ E

T35 *

T36 +

T37 RCL+ F

T38 RTN

Regards,

Jeff Kearns

                  
Re: Programming TVM
Message #33 Posted by Karl Schneider on 5 Jan 2008, 12:36 a.m.,
in response to message #32 by Jeff Kearns

Hi, Jeff --

Yes, I believe that I remember some of your posts...

Quote:
Most of all, I have found the TVM equation to be among the most valuable formulas in my arsenal. There is a great 38-liner TVM program that I often use for each of my Pioneers (32sII, 33s, 35s)...

This program avoids rounding error by using the natural logarithm in such a way as to not discard precious significant digits of i/n.


Of course, I'm sure you're aware that there are five "true" Pioneer-series financial or scientific models with professionally-implemented TVM built-in: HP-10B, HP-14B, HP-17B, HP-17BII, and HP-27S. Each of these will also get the correct answer, presumably made possible by an internal "ln (1+x)" function that calculates more accurately with small values of x. This function is accessible directly on the HP-42S and the HP-41 series, as well as on RPL-based models.

The main annoyance with using a single general-purpose TVM program on a scientific calculator is that the SOLVE function must be utilized, even though only one of the TVM calculations (for interest rate "i") requires numerical iteration. Direct algebraic solutions can be programmed for the other four variables. (The HP-42S manual includes a general-purpose 35-line TVM equation for use with SOLVER.)

BTW, preformatting codes ("pre" and "/pre" inside brackets) will make your listing look better:

B: present value or "base" value 
P: payment 
n: periods 
i: interest rate in % 
E: end/begin modes 
F: future value

T01 LBL T T02 INPUT N T03 INPUT I T04 INPUT B T05 INPUT P T06 INPUT F T07 INPUT E T08 RCL I T09 100 T10 / T11 ENTER T12 ENTER T13 1 T14 + T15 LN T16 x<>y !switch x with y T17 LASTx T18 1 T19 X<>Y? !x not equal to y? T20 - T21 / T22 * T23 RCL* N T24 e^x T25 RCL* B T26 LASTx T27 1 T28 - T29 RCL* P T30 RCL I T31 100 T32 / T33 1/X T34 RCL+ E T35 * T36 + T37 RCL+ F T38 RTN

Regards,

-- KS

Edited: 5 Jan 2008, 12:55 a.m.

            
Re: Programming Programmable Calculators
Message #34 Posted by Garth Wilson on 4 Jan 2008, 10:42 p.m.,
in response to message #30 by Stefan Vorkoetter

Quote:
Does anyone program their keystroke programmable scientific calculator (i.e. not RPL graphing calculator) these days for other than little 4-liners or larger programs for fun.
Absolutely, and many of the programs I write are a couple of hundred bytes, and for work, not fun (although work is kind of fun). I haven't done one over 1,000 bytes in nearly 20 years though.
Quote:
Or phrased another way, has the full-featured keystroke programmable calculator outlived its usefulness?
I say no. As Jeff Kearns said, the calculator is often easier than doing the job on a PC. I've also had some programs in my 41cx for 20 years; but the world of PCs is too unstable for that to be practical on a PC.
Quote:
If so, then I think it unlikely that HP will ever produce the much-desired (by this forum) HP-41C successor.
If their marketing people recognized the value, they'd do it. But look at the 71, which was killed not because better things came along to replace it, but because the marketing was so foolishly mismanaged.

E-mail: wilsonmineszdslextremezcom (replace the z's with @ and . )

Edited: 5 Jan 2008, 2:34 p.m.

      
Re: Programming Programmable Calculators
Message #35 Posted by Antoine M. CouŽtte on 6 Jan 2008, 6:25 a.m.,
in response to message #1 by Stefan Vorkoetter

Quote:
Does anyone actually program their programmable calculators any more?

For over 30 years I have used my HP41CV/CX, then "HP41X/Y/Z" HP41CX Emulator from HrastProgrammer running on HP48GX/HP49G and "EMU41" HP41CX Emulator by Jean-FranÁois Garnier running ( amazingly fast ... ) on PC, for 2 main Applications running with own Software I almost entirely ( @ 99.5 % ) wrote myself :

- Since the early eighties : Celestial Navigation, now as a "hobby" which I keep practising now and then,

- And for the past six years : Aircraft Programs - and mainly Real Time In-Flight Fuel Monitoring - which, as an Airline Pilot now Flying B757, I am currently using on an very frequent basis, i.e. for almost every flight.

Total size of the HP41CX Software I wrote for both applications : over 75 Kbytes ( well over 20 000 instructions ), i.e. over 18 pages of 4 Kbytes each ( Almost 64 K for Celestial Navigation running on 2 x 32 K Bank "automatically" Switchable RAMBOX II by W&W Software GmbH and almost 12 K for Aviation Programs )

Antoine

Edited: 6 Jan 2008, 3:29 p.m.

      
Re: Programming Programmable Calculators
Message #36 Posted by Nick on 7 Jan 2008, 9:31 a.m.,
in response to message #1 by Stefan Vorkoetter

Well Stefan, what can I say... I program my HP49G+ all of the time, but most of the time is for such things like finding some analytic expression out of a given recursive sequence.

Most of the time I use User-RPL and the many (ingenious) commands of the CAS, most of which are completely and utterly underhyped IMHO. My intention is most of the time to expand the CAS in terms of the CAS itself, and believe me: On that machine User-RPL already offers much more than any synthetic blabla of the HP41 could ever offer. It's quite nice (and also twisted) to use even the flaws of the HP49G+ for pushing up the limits and getting not only programs but also (implicit) definitions of new objects structures that evaluate to whatever you want by using as much of the already available power as possible.

Small examples:

Try:

{1 1} 1 ->ALG X * EVAl

or:

{1 1} 1 ->ALG {2 2} 1 ->ALG * EVAL

and see what comes out ;-) What could that be used for, except for a polynomial? How about using that for defining sets themselves *and* EVALuating them without the need of lengthy programs, but just (mis?)using the already easily exploitable CAS? And it goes much much further than these small example might ever show.

We have a machine here that speaks a very powerful and flexible language, but the question seems to be, if we would ever bother investigate things beyond the usual number results.

It might also be named curiosity to learn a somewhat strange but nonetheless very logical language after all! ;-) The results of "speaking" that language are astonishing exactly *because* the language is so unlimited that it also allows its own breakdown. Isn't that appetizing?

Cheers,

Nick

            
Re: Programming Programmable Calculators
Message #37 Posted by George Bailey (Bedford Falls) on 7 Jan 2008, 10:14 a.m.,
in response to message #36 by Nick

Quote:
{1 1} 1 ->ALG X * EVAl

or:

{1 1} 1 ->ALG {2 2} 1 ->ALG * EVAL


Could you please explain what I have to enter on my HP 49G+? I can't find "->ALG" in the CAT. Do you mean "switch from RPN to ALG"? I don't get it :-(

                  
The ->ALG command (49 series)
Message #38 Posted by James M. Prange (Michigan) on 7 Jan 2008, 12:13 p.m.,
in response to message #37 by George Bailey (Bedford Falls)

First execute 256 ATTACH to attach the built-in development library, then press APPS, then select "14.Development lib" to display its menu, then press NXT to display menu page 2, and find ->ALG as the last menu item on the page. Or you can display the menu page by executing 256.02 MENU (or TMENU). Or find ->ALG in the CAT browser.

Even without attaching the development library, you can use 256.02 MENU (or TMENU) to display its menu, and use ->ALG as an operation, although not as a programmable command.

Regards,
James

Edited: 7 Jan 2008, 12:23 p.m.

                        
Re: The ->ALG command (49 series)
Message #39 Posted by George Bailey (Bedford Falls) on 7 Jan 2008, 12:33 p.m.,
in response to message #38 by James M. Prange (Michigan)

Thanks a lot!

                              
Re: The ->ALG command (49 series)
Message #40 Posted by Nick on 7 Jan 2008, 3:54 p.m.,
in response to message #39 by George Bailey (Bedford Falls)

Hi George!

And of course it's the programmatic usage of commands like ->ALG, COMP->, ->LST ->PRG and so on that allows construction of programs that do (at last!) something completely different, as we already know from Monty Python's Flying Circus. ;-)

Attach that lib 256 as James described, and play around, but beware of sudden loss of senses of your calculator, which means that a backup might prove useful for bringing it back to life and regain lost memories again, after too much neurALGic programming.

Cheers,

Nick

Edited: 17 Jan 2008, 7:07 p.m. after one or more responses were posted

                                    
Re: The ->ALG command (49 series)
Message #41 Posted by James M. Prange (Michigan) on 7 Jan 2008, 5:12 p.m.,
in response to message #40 by Nick

Adding a note of caution, some of these development library commands seem to do thorough argument checking, just like normal UserRPL commands, but some don't. Use them carefully.

For example, with the H\-> command, one can easily build an "invalid" object. The invalid object might not cause any problem, or it might cause a "hang", or a warmstart, or a TTRM ("Try To Recover Memory?"), or it might not cause any apparent problem at first, but corrupt memory and cause a problem that becomes apparent later (perhaps after you've already backed up corrupted memory), but with no obvious cause.

Much the same applies when programming in SysRPL or assembly language.

When using these kinds of tools, back up user memory frequently, and if you think that you may have caused a problem, and you've added or edited any variables that you don't want to lose since the last backup, then do a backup of the possibly corrupt memory to an SD card, then invoke a TTRM with the ON&A&F combination, and respond YES. If the memory recovery is completely successful (no D.01, D.02, etc. subdirectories names and all variables recovered), then you're all set (except that you'll need to restore your flags and modes). If recovery isn't successful, then you can try restoring a previous backup, or you can try restoring the corrupted backup and try to copy whichever individual variables you want to the card.

Regards,
James


[ Return to Index | Top of Index ]

Go back to the main exhibit hall