Post Reply 
Question for Trig Gurus
07-31-2022, 11:08 AM
Post: #27
RE: Question for Trig Gurus
(07-30-2022 06:27 PM)Albert Chan Wrote:  see An algorithm for computing Logarithms and ArcTangents, by B. C. Carlson

This reminded me of: A Unified Algorithm for Elementary Functions
Thanks for posting this paper.

Inverse Tangent

Example

x = 0.6

0.6 an 2 + 1 = √
1.1661904

+ 1 ÷ 2 =
1.0830952

× 1.1661904 = √ × 32 =
35.964003

12 × 1.0830952 + 35.964003 + 1
÷ 45
÷ 0.6
= 1/x
× 180
÷ \(\pi\) =

30.963783 (30.963757)

Inverse Cosine

It turns out that we can not use \(d(2, 2)\) here as well to get 5 correct figures.
So we need to compute \(d(3, 3)\).

Code

Here's a Python program:
Code:
def arccos(x):
    a_0 = x
    g_0 = 1    
    a_1 = (a_0 + g_0) / 2
    g_1 = sqrt(a_1 * g_0)
    a_2 = (a_1 + g_1) / 2
    g_2 = sqrt(a_2 * g_1)
    d = (-a_0 + 84 * a_1 + 704 * a_2 + 2048 * g_2 )/2835
    return degrees(sqrt(1 - x*x) / d)

Example

1 + 0.7 ÷ 2 =
0.85


0.9219544

+ 0.85 ÷ 2 =
0.8859772

× 0.9219544 = √ × 2048 =
1850.9554

704 × 0.8859772 =
623.72795

1 - 0.7 an 2 = √
0.7141428

84 × 0.85 - 0.7 + 623.72795 + 1850.9554 ÷ 2835
÷ 0.7141428
= 1/x
× 180
÷ \(\pi\) =

45.5729906 (45.572996)

Of course we could use this formula again and then the above method to calculate \(\tan^{-1}(x)\):

\(
\begin{align}
\tan \frac{x}{2} &= \sqrt{\frac{1-\cos x}{1+\cos x}} \\
\end{align}
\)

Conclusion

In both cases, I assumed that the calculator only works in chain mode.
Unfortunately, this means that in calculations similar to a scalar product, we often have to write down and re-enter intermediate results.
An accumulator in which these products could be added would be beneficial.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Question for Trig Gurus - Namir - 12-01-2014, 07:49 PM
RE: Question for Trig Gurus - toml_12953 - 12-01-2014, 08:08 PM
RE: Question for Trig Gurus - PANAMATIK - 12-01-2014, 08:46 PM
RE: Question for Trig Gurus - Namir - 12-01-2014, 10:54 PM
RE: Question for Trig Gurus - toml_12953 - 12-02-2014, 02:30 AM
RE: Question for Trig Gurus - Namir - 12-02-2014, 09:21 AM
RE: Question for Trig Gurus - Namir - 12-02-2014, 04:57 PM
RE: Question for Trig Gurus - Albert Chan - 07-29-2022, 03:19 PM
RE: Question for Trig Gurus - Mark Hardman - 12-01-2014, 11:00 PM
RE: Question for Trig Gurus - Thomas Klemm - 12-02-2014, 12:09 AM
RE: Question for Trig Gurus - Namir - 12-02-2014, 12:16 AM
RE: Question for Trig Gurus - Thomas Klemm - 12-02-2014, 01:12 AM
RE: Question for Trig Gurus - Namir - 12-02-2014, 01:50 AM
RE: Question for Trig Gurus - Namir - 12-02-2014, 01:49 AM
RE: Question for Trig Gurus - Namir - 12-05-2014, 02:48 AM
RE: Question for Trig Gurus - Namir - 12-09-2014, 02:19 PM
RE: Question for Trig Gurus - Thomas Klemm - 07-29-2022, 12:59 PM
RE: Question for Trig Gurus - ttw - 07-29-2022, 10:19 PM
RE: Question for Trig Gurus - Thomas Klemm - 07-30-2022, 08:26 AM
RE: Question for Trig Gurus - Albert Chan - 07-30-2022, 06:27 PM
RE: Question for Trig Gurus - Thomas Klemm - 07-30-2022, 09:38 AM
RE: Question for Trig Gurus - Thomas Klemm - 07-31-2022 11:08 AM
RE: Question for Trig Gurus - Albert Chan - 07-31-2022, 09:54 PM
RE: Question for Trig Gurus - Thomas Klemm - 08-01-2022, 05:19 AM
RE: Question for Trig Gurus - Albert Chan - 08-01-2022, 02:36 PM
RE: Question for Trig Gurus - Thomas Klemm - 08-02-2022, 06:35 AM
RE: Question for Trig Gurus - Albert Chan - 08-02-2022, 05:28 PM
RE: Question for Trig Gurus - Thomas Klemm - 08-03-2022, 04:42 PM



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