On 05/11, b...@magnetophon.nl wrote:
>
> >this? this is not what I meant...
>
> So what *did* you mean?

I can't find my old email on this list... fortunately it is still in
my mbox, let me quote it:

        > 2) you said «  tabulate().cub can be improved, it.interpolate_cubic() 
is simply wrog
        > near X0 or X1 » Can you elaborate her

        Lets look at the code,

            cub = it.interpolate_cubic(d,y0,y1,y2,y3)
            with {
                x0 = x1-1;
                x1 = int(id);
                ...
                y0 = rdtable(S, wf, rid(x0, C));
                y1 = rdtable(S, wf, rid(x1, C));

        I see two problems:

                1. It always need C=1 or "-ct 1" compiler option, even if the 
input "x" is
                   strictly in [r0,r1] range. Otherwise x0=-1 when x=r0.

                   Not good, C=1 or "-ct 1" implies performance penalty.

                2. Even if C=1, we loss the prcision at r0. In this case y0 = 
y1 and this
                   breaks the idea of cubic interpolation.

        The same for r1. I'd suggest you to plot

                X0 = 0;
                X1 = ma.PI;

                tb(x) = ba.tabulate(1, sin, 100, X0,X1, x).cub;

                line(n, x0,x1) = x0 + (ba.time%n)/n * (x1-x0);

                process = line(50000, X0,X1) <: sin - tb : abs;

        and you will see that .cub() is very inaccurate at the start and at the 
end.

> >It is not that I think that taylor() makes any real sense.
>
> Why is that?  Remember, I don't know what taylor is.

Remember, this is not my area of expertise ;)

But, afaik the Taylor approximation is very suboptimal. The error is "small"
near 0, but it quickly grows as we move away from 0. "0" is not necessarily
zero, I mean the central point of approximation, don't know how to say this
in English.

Contrary, the Chebyshev approximation apprroximates the function on the whole
interval and a) it is simpler, b) close to optimal, and c) the error is
distributed more evenly.

Oleg.



_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to