I should have written tan(89.999999 degrees), sorry! Angles in degrees have to be converted to radians, like in the second table examples, which have been multiplied by 1.745329252e-02, that is, pi/180.
I forgot to mention the running time, less than five seconds (ordinary HP-12C). Also, the program gives at least eight digits of accuracy most of the times.

Regards,

Gerson.

------------

The HP-12c Platinum should give more accurate results, but I don't have one to check this out.

I certainly knew the Taylor series for sin(x) and cos(x) are similar to those for sinh(x) and cosh(x), except the former ones are alternating series and the latter ones are not. However, it never had occured to me to combine them to approximate the trigonometric functions... not until yesterday morning when playing with my 28S I added the first few terms of the sin(x) and sinh(x) series together and realized this might work. Then I tried cos(x) and cosh(x) and the resulting series appeared to require less steps on the 12C. Anyway, other than rewriting the series, I haven't tried to optimize the program, so I think there is still room for improvement. I think the program runs fast even on the older HP-38, I'll try it on Nonpareil later.

It was possible to program accurate trig functions. The only problem was that once the function was generated their was little room left for anything else. All the same we managed to write some basic Surveying programs that at time seemed out of this world. Prior to this you had to use trig tables and curta calculators.

We used infinite series for the trig functions. See below.

Sin x = x - x3/3! + x5/5! - x7/7! + ......

where x is in radians and in the above context x3 means x cubed.

I spent hours programming this machine. It was my introduction to programming. I was totally hooked.

The machine was about the size of a present day lap top and about double the thickness. The program was lost the minute you switched off the calculator. However you could store the program on a punch card. The card had to be manually punched as you wrote the program.
Editing was an interesting exercise. You seemed to go through a stack of cards before you got it right.

I know what you mean. Once I knew a retired municipal surveyor who had a small surveying office at home and spent more time there doing calculations than at the field. He had no computer, only one 11C loaded with of couple of simple programs and one sharp scientific calculator to help him. He showed me a printed spread sheet as an example of the calculations he did. I told him it was nonsense to do that kind of work without a computer and advised him to get at least a pocket computer. He purchased a CASIO PB 700 for about 100 dollars (4 kB RAM, later upgraded to whopping 16 kB!) and I wrote him a BASIC program which did in seconds the work it previously took him a whole day or two.
He had a small museum of old mechanical and electronic calculators he had purchased during his career. He told me he had used trigonometric tables in the beginning. He showed me a Curta Type II, shining in its case, complete with manuals and offered me for about 20 dollars... which I refused to buy because I was not interested in mechanical devices. I remember one of the manuals described a procedure to approximate the sine function on it. Those were the (hard) days!

Thanks for taking the time to key that in and verifying the table. I was curious to know about the Platinum results. As I said, no optimization has been tried yet. The program is fast on the ordinary 12C but somewhat long.