Post Reply 
Shammas Polynomials, Pade-Shammas Polynomials, Fourier-Shammas Series
09-06-2020, 05:10 PM
Post: #7
RE: Shammas Polynomials, Pade-Shammas Polynomials, Fourier-Shammas Series
(09-06-2020 02:20 PM)pinkman Wrote:  Example for the arc cosine approximation and the A+B/i form:
F2:=SHAMMASP([1.58,−449.52,34304.79,−471342.72,2249062.47,−4666165.33],'2+(2/I)','I')
F1:='ACOS(X)'

From Namir's article, page 30-31, we should have 8 coefficients.
Code:
c := [ 1.58002850493741, -449.524818312817, 34304.7929190518, -471342.719845201,
       2249062.47202831, -4666165.32624902, 4350327.34390859, -1495738.54253386 ]

Again, from the article, F2 have root-mean-square error of 0.0104, or 0.6°
However, F2 is bad when when x ≈ 1. We expected F2(1) = sum(c) ≈ acos(1) = 0

XCas> sum(c)       → 0.075438067317       // or, 4.3° error

XCas> shammasp(coef, f) := coef * extend([1], map(range(1,length(coef)), f))
XCas> f2 := shammasp(c, k -> x^(2+2/k))
XCas> f1 := acos(x)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Shammas Polynomials, Pade-Shammas Polynomials, Fourier-Shammas Series - Albert Chan - 09-06-2020 05:10 PM



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