MikaelSlevinsky / SincFun.jl

Sinc numerical methods in Julia
Other
3 stars 0 forks source link

Switch to Midpoint rule and recycle function samples #7

Closed MikaelSlevinsky closed 9 years ago

MikaelSlevinsky commented 9 years ago

This would make sincfun construction of an even number of points instead of odd. Since in the constructor they would also be powers of 2, only the Cooley-Tukey fft would be required for BigFloat. Simpler and faster.

MikaelSlevinsky commented 9 years ago

If instead of the step size prescribed as a function of the number of samples h(n), we use a geometrically decreasing step size and an n(h), then function samples can be recycled.

MikaelSlevinsky commented 9 years ago

This is currently solved with @9aef71a0d0b3d4ca64325e050afe3ce5148b7ad7.

The constructor convergence criterion is based on the relative error of the integration formula, i.e. the trapezoidal rule. Once the relative error is eps(T)^(1/3) (maybe this can be tightened), then this means the last approximation is about twice as good. To polish off the approximation, a midpoint-based approximation computed and these values are interlaced with the last trapezoidal rule. The interlacing implies that half of the last function values are recycled. Since the convergence iteration is on a geometric scale, this is close to the asymptotic best of using n(h) while still keeping the original form of a sincfun.