HP Forums
Fast and Accurate Trigonometric Functions on the HP-17BII - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Fast and Accurate Trigonometric Functions on the HP-17BII (/thread-105900.html)



Fast and Accurate Trigonometric Functions on the HP-17BII - Gerson W. Barbosa - 01-12-2007

To all who might be interested, just available at the Articles Forum:

Fast and Accurate Trigonometric Functions on the HP-17BII

Accurate? Surely! Fast? Well, kind of. But I wanted to make up a trilogy :-)

Fast and Accurate Trigonometric Functions on the HP-12C Platinum

Fast and Accurate Trigonometric Functions on the HP-12C

Thanks Charles for first noticing the simpler equations were better.

Regards,


Gerson


Re: Fast and Accurate Trigonometric Functions on the HP-17BII - Karl Schneider - 01-14-2007

Hi, Gerson --

Thank you for posting your dedicated work in the Articles Forum. They are certainly worthy, and probably more appropriate there than in the Software Library, due to the applied-mathematics content.

I expect that the HP-17BII programs will work on the HP-17B, as well?

Regards,

-- KS


Re: Fast and Accurate Trigonometric Functions on the HP-17BII - Gerson W. Barbosa - 01-14-2007

Hello Karl,

I don't have an HP-17B but I think the equations should run just fine on it. I'd like to test the equations on the HP-17BII+ also.

The HP-200LX was a good developing tool, but when solving for the inverse functions using the full-range equations I noticed the HP-17BII behaved differently. That's why I had to append the apparently useless terms to the cosine and tangent equations in the what I called IF-LESS EQUATIONS sets (that was an experiment I decided to keep).

I have just included a note at the end about a even shorter minimax polynomial equation (see my reply to Charles, which ended up orphan). The minimax polynomial is accurate in the range -18 to 18 degrees, that is, +/- 90/5. It is then expanded to -90 to 90 degrees by means of

sin 5.x = sin x * (sin2x * (16 * sin2x - 20) + 5)

This doesn't improve the solving time but makes the equation shorter. Reducing the range even more would actually make the equation slower and longer. I think this is the right balance between size and speed.

Regards,

Gerson.

Edited: 14 Jan 2007, 2:38 a.m.