Laguerre cosine approximation<*** End of File ***>
Math history fun fact
I came across this some 50 years ago,
before calculators had trig keys.It's good to about 4 significant digits for first quadrant,
and exact at 0, 45, 60, 90 degrees.m = angle/90 for degrees or angle/pi/2 for radians
-m^2
( --------------------------------- - 1)
sqrt((-m^3 + 4m^2 -5m + 2)/3) + mThis can be expressed in linear form as:
-(((((((4-m)m-5)m+2)/3)^(1/2)+m)^(-1)mm)-1)
which can be keyed in directly on a simple chain-logic memory
calculator with a square root key and the ability to find the
reciprocal using some combination of / and = keys. Handle the
leading minus at the end, just mentally if necessary.To test it, on a 12C, for angles in degrees:
90 / ENTER ENTER ENTER
4 x<>y - X 5 - X 2 + 3 / g-sqrt + 1/x X X 1 - CHS
OT: Cosine curio
|
|
« Next Oldest | Next Newest »
|
▼
Post: #5
12-11-2011, 05:17 PM
▼
Post: #7
12-12-2011, 06:49 PM
Interesting approximation! Can we enhance it now that we have tools like Matlab and Excel? Crawl it right in pointing out that the trailing -1 in the first two equations should be +1. Namir
Post: #8
12-13-2011, 05:45 AM
Really interesting approximation. As Namir and Crawl have already point out, there is a typo in the developed formulae only.
The linear formulea and the RPN instructions are all correct. Using my HP-41C, I just test a few points to observe error between cosine and the Laguerre approximation (express in the following table as ppm
Angle(°) m=a/90° Laguerre(m) Cos(a) Error(ppm) As explain, in first quadrant, few error and exact value for same remarkable values are obtained. No more approximation can be obtained after 180° due to the sign of the polynôme under the square root. The following figure better illustrate accuracy and region of interest for this cosine approximation: Note that in this graph, Lag(a) is the real part of the laguerre approximation. That’s why plot continue after the 180° limit. As Namir point it out, we can enhance this approximation, but not only in accuracy, other way may be to make it usable on a larger domain.
Edited: 13 Dec 2011, 5:58 a.m. |