toms418, a FORTRAN77 code which estimates Fourier integrals of the form integral ( a<=x<=b ) f(x) * cos(wx) dx, or integral ( a<=x<=b ) f(x) * sin(wx) dx, by Bo Einarsson. This is a version of ACM toms algorithm 418.

While the text of many ACM toms algorithms is available online through ACM: or NETLIB:, most of the early algorithms are not available. This is one of them. I typed it in.


call fspl2 ( f, a, b, fpa, fpb, fba, fbb, w, eps, max, lc, ls, c, s )
estimates the integral of F(X)*COS(W*X) and F(X)*SIN(W*X).


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


toms418 is available in a Fortran77 version.

Related Programs:


intlib, a FORTRAN90 library which includes routines to do Filon quadrature.

toms353, a FORTRAN77 library which estimates an integral of the form integral ( a <= x <= b ) f(x) cos(w*x) dx or integral ( a <= x <= b ) f(x) sin(w*x) dx using Filon quadrature, by Chase and Fosdick. This is a version of ACM toms algorithm 353.


Original Fortran77 version by Bo Einarsson. This version by John Burkardt.


  1. Bo Einarsson,
    Algorithm 418: Calculation of Fourier Integrals,
    Communications of the ACM,
    Volume 15, Number 1, January 1972, pages 47-48.

Source Code:

Last revised on 14 November 2023.