(71B) Approximation for Tan(x) for the HP-71B
|
09-25-2017, 08:03 PM
(This post was last modified: 09-27-2017 01:17 PM by Namir.)
Post: #1
|
|||
|
|||
(71B) Approximation for Tan(x) for the HP-71B
This is an approximation for tan(x) using a sequence of polynomial coefficients that I found in a book "A Handbook of Integer Sequences" by A. J. A Sloane that presents numerous sequences of integers. The book does cover a few approximation to functions, including tan(x). Here is the code for the HP-71B. When you run the program, it prompts you to enter a value of X. The program then displays the calculated value of tan(x), pauses for 3 seconds, and then displays the %$ error. The function offers excellent approximation for (0, 0.35). You can use trig identities to calculate the tan(x) for higher angles using accurate tan(x) for smaller x values, for example, using:
tan(x) = 2*tan(x/2)/(1 + tan(x/2)^2) Here is the HP-71B listing. Code: 10 REM TAN(X) APPROXIMATION Here is another version that combines the original sequence and the factorials Here is the HP-71B listing. Code: 10 REM TAN(X) APPROXIMATION |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)