Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The qcheb algorithm is a mystery and is inflexible. #6

Open
emsr opened this issue Apr 5, 2020 · 0 comments
Open

The qcheb algorithm is a mystery and is inflexible. #6

emsr opened this issue Apr 5, 2020 · 0 comments

Comments

@emsr
Copy link
Owner

emsr commented Apr 5, 2020

There is actually a good bit online about this. it's one of those ancient algos that gets passed around.

c***purpose  this routine computes the chebyshev series expansion
c            of degrees 12 and 24 of a function using a
c            fast fourier transform method
c            f(x) = sum(k=1,..,13) (cheb12(k)*t(k-1,x)),
c            f(x) = sum(k=1,..,25) (cheb24(k)*t(k-1,x)),
c            where t(k,x) is the chebyshev polynomial of degree k.
c        parameters
c          on entry
c           x      - real
c                    vector of dimension 11 containing the
c                    values cos(k*pi/24), k = 1, ..., 11
c
c           fval   - real
c                    vector of dimension 25 containing the
c                    function values at the points
c                    (b+a+(b-a)*cos(k*pi/24))/2, k = 0, ...,24,
c                    where (a,b) is the approximation interval.
c                    fval(1) and fval(25) are divided by two
c                    (these values are destroyed at output).
c
c          on return
c           cheb12 - real
c                    vector of dimension 13 containing the
c                    chebyshev coefficients for degree 12
c
c           cheb24 - real
c                    vector of dimension 25 containing the
c                    chebyshev coefficients for degree 24

So the polynomial expansion is in terms of T_n(x) and the roots are those of another Chebyshev polynomial U_{n-1}(x).

Let's have the ability to have expansions in T_{2m}(x) (and T_m(x)) at roots of U_{2m-1}(x).

In fact, I want a general Clenshaw thing for arbutrary polynomials with a recurrence relation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant