Post Reply 
Trigonometric Functions for the HP-38C/HP-12C
03-25-2016, 04:51 AM (This post was last modified: 03-25-2016 04:51 AM by Gerson W. Barbosa.)
Post: #2
RE: Trigonometric Functions for the HP-38C/HP-12C
(03-25-2016 03:30 AM)bshoring Wrote:  Some time ago, Gerson Barbosa wrote a really nice program to compute Trig functions on the HP-12C and its predecessor, the HP-38C.

I'm interested in the source of the coefficients:

-3.333324820E-01 STO 1
1.998722722E-01 STO 2
-1.397054038E-01 STO 3
-8.860960894E-07 STO 4
1.349561365E-11 STO 5
-9.716369450E-17 STO 6

More precisely, does anyone know if there exists a listing of these coefficients that show more digits?

I now have an emulator of the HP-38C (iPhone) that allows me to store constants of up to 15 or 16 digits, instead of 10 on the original machines. I've already taken care of the one in Reg 0 as I just took a 16 digit Pi and divided it by 180. My thinking is that if I can use longer coefficients I can probably get more accuracy. Although this program has a high degree of accuracy to begin with.


Unfortunately more digits won't help here. In order to improve the accuracy you would need more constants, but then this wouldn't be possible on the HP-12C/38C using this approach, given their limited memory. I was able to get much better accuracy and functionality on the HP-12C Platinum whose 20 registers are always available, even when all 400 programming steps are fully used:

The linked TurboBCD program, for instance, provides 17-digit accuracy. But it required the computation of 18 constants, 10 for arctangent and 8 for sine:

Here, starting at page 8, is an explanation of the method:

Thank you for your interest in this old program of mine!

Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Trigonometric Functions for the HP-38C/HP-12C - Gerson W. Barbosa - 03-25-2016 04:51 AM

User(s) browsing this thread: 1 Guest(s)