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): 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. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)