FFTPACK5
Fast Fourier Transform
FFTPACK5 is a FORTRAN90 library,
using single and double precision arithmetic,
which computes Fast Fourier Transforms.
Special features include:
-
real or complex data can be handled;
-
separate routines for forward analysis (data => Fourier coefficients)
and backward analysis (Fourier coefficients => data);
-
sine and cosine transform routines;
-
quarter wave sine and cosine transform routines;
-
the amount of data is NOT required to be a power of 2.
Routines in the library come in groups of three:
-
an initialization routine;
-
the forward computational routine (data to FFT coefficients);
-
the backward computational routine (FFT coefficients to data).
The following table groups the routines:
| Initialization | Forward | Backward | Purpose |
| CFFT1I | CFFT1F | CFFT1B | FFT for complex 1D data |
| CFFT2I | CFFT2F | CFFT2B | FFT for complex 2D data |
| CFFTMI | CFFTMF | CFFTMB | FFT for complex multi-D data |
| COSQ1I | COSQ1F | COSQ1B | Even function 1D quarter-cosine FFT, (single precision) |
| DCOSQ1I | DCOSQ1F | DCOSQ1B | Even function 1D quarter-cosine FFT, (double precision) |
| COSQMI | COSQMF | COSQMB | Even function 1D quarter-cosine FFT |
| COST1I | COST1F | COST1B | Even function 1D cosine FFT (single precision) |
| DCOST1I | DCOST1F | DCOST1B | Even function 1D cosine FFT (double precision) |
| COSTMI | COSTMF | COSTMB | Even function 1D cosine FFT |
| RFFT1I | RFFT1F | RFFT1B | FFT for real 1D data (single precision) |
| DFFT1I | DFFT1F | DFFT1B | FFT for real 1D data (double precision) |
| RFFT2I | RFFT2F | RFFT2B | FFT for real 2D data |
| RFFTMI | RFFTMF | RFFTMB | FFT for real multi-D data |
| SINQ1I | SINQ1F | SINQ1B | Even function 1D quarter-sine FFT |
| SINQMI | SINQMF | SINQMB | Even function 1D quarter-sine FFT |
| SINT1I | SINT1F | SINT1B | Even function 1D sine FFT (single precision) |
| DSINT1I | DSINT1F | DSINT1B | Even function 1D sine FFT (double precision) |
| SINTMI | SINTMF | SINTMB | Even function 1D sine FFT |
Author:
The original Fortran77 version of this code was written by Dick Valent and
Paul Swarztrauber.
Some minor adjustments were made by John Burkardt to convert the program
to FORTRAN90 format, and to add double precision routines.
Licensing:
The code described and made available on this web page is distributed
under the
GNU LGPL license.
Related Data and Programs:
FFTPACK
is a FORTRAN90 library which
implements the Fast Fourier Transform.
FFTPACK5 is also available in its original
FORTRAN77 source code.
FFTW3
is a FORTRAN77 interface to a library known as "The Fastest Fourier Transform in the West".
GSL
is a C++ library which
embodies the "GNU Scientific Library", and includes FFT routines.
NMS
is a FORTRAN90 library which
includes a number of FFT routines.
POLPAK
is a FORTRAN90 library which
includes "slow" Fourier Transform routines, which may be useful for
understanding the underlying calculation, or estimating the improvement
produced by using the "fast" approach.
XERROR
is a FORTRAN90 library which
is designed to report and handle errors detected during program execution.
Reference:
-
William Briggs, Van Emden Henson,
The DFT: An Owner's Manual for the Discrete Fourier Transform,
SIAM, 1995,
ISBN13: 978-0-898713-42-8,
LC: QA403.5.B75.
-
Elbert Brigham,
The Fast Fourier Transform and Its Applications,
Prentice-Hall, 1988,
ISBN: 0133075052,
LC: QA403.B74.
-
Bill Buzbee,
The SLATEC Common Math Library,
in Sources and Development of Mathematical Software,
edited by Wayne Cowell,
Prentice-Hall, 1984,
ISBN: 0-13-823501-5,
LC: QA76.95.S68.
-
Eleanor Chu, Alan George,
Inside the FFT Black Box,
CRC Press,
ISBN: 0849302706,
LC: QA403.5C5.
-
David Kahaner, Cleve Moler, Steven Nash,
Numerical Methods and Software,
Prentice Hall, 1989,
ISBN: 0-13-627258-4,
LC: TA345.K34.
-
Paul Swarztrauber,
Symmetric FFT's,
Mathematics of Computation,
Volume 47, 1986, pages 323-346.
-
Paul Swarztrauber,
Vectorizing the FFT's,
in Parallel Computations,
edited by Garry Rodrigue,
Academic Press, 1982,
ISBN: 0125921012,
LC: QA76.6.P348.
-
Paul Swarztrauber,
Fast Fourier Transform Algorithms for Vector Computers,
Parallel Computing,
Volume 1, Number 1, August 1984, pages 45-63.
-
FFTPACK 5.0 Reference manual
-
http://www.cisl.ucar.edu/css/software/fftpack5
the home page for the original FORTRAN77 version of FFTPACK5.
Source Code:
Examples and Tests:
COST_TEST does a pair of cosine forward and backward transforms.
SINT_TEST does a pair of sine forward and backward transforms.
List of Routines:
-
CFFT1B: complex backward fast Fourier transform, 1D.
-
CFFT1F: complex forward fast Fourier transform, 1D.
-
CFFT1I: initialization for CFFT1B and CFFT1F.
-
CFFT2B: complex backward fast Fourier transform, 2D.
-
CFFT2F: complex forward fast Fourier transform, 2D.
-
CFFT2I: initialization for CFFT2B and CFFT2F.
-
CFFTMB: complex backward fast Fourier transform, 1D, multiple vectors.
-
CFFTMF: complex forward fast Fourier transform, 1D, multiple vectors.
-
CFFTMI: initialization for CFFTMB and CFFTMF.
-
COSQ1B: real backward cosine quarter wave transform, 1D.
-
COSQ1F: real forward cosine quarter wave transform, 1D.
-
COSQ1I: initialization for COSQ1B and COSQ1F.
-
COSQMB: real backward cosine quarter wave transform, multiple vectors.
-
COSQMF: real forward cosine quarter wave transform, multiple vectors.
-
COSQMI: initialization for COSQMB and COSQMF.
-
COST1B: real backward cosine transform, 1D.
-
COST1F: real forward cosine transform, 1D.
-
COST1I: initialization for COST1B and COST1F.
-
COSTMB: real backward cosine transform, multiple vectors.
-
COSTMF: real forward cosine transform, multiple vectors.
-
COSTMI: initialization for COSTMB and COSTMF.
-
DCOSQ1B: double precision backward cosine quarter wave transform, 1D.
-
DCOSQ1F: double precision forward cosine quarter wave transform, 1D.
-
DCOSQ1I: initialization for DCOSQ1B and DCOSQ1F.
-
DCOST1B: double precision backward cosine transform, 1D.
-
DCOST1F: double precision forward cosine transform, 1D.
-
DCOST1I: initialization for DCOST1B and DCOST1F.
-
DFFT1B: double precision backward fast Fourier transform, 1D.
-
DFFT1F: double precision forward fast Fourier transform, 1D.
-
DFFT1I: initialization for DFFT1B and DFFT1F.
-
DSINT1B: double precision backward sine transform, 1D.
-
DSINT1F: double precision forward sine transform, 1D.
-
DSINT1I: initialization for DSINT1B and DSINT1F.
-
FACTOR determines the factors of an integer.
-
RFFT1B: real backward fast Fourier transform, 1D.
-
RFFT1F: real forward fast Fourier transform, 1D.
-
RFFT1I: initialization for RFFT1B and RFFT1F.
-
RFFT2B: real backward fast Fourier transform, 2D.
-
RFFT2I: initialization for RFFT2B and RFFT2F.
-
RFFTMB: real backward fast Fourier transform, 1D, multiple vectors.
-
RFFTMF: real forward fast Fourier transform, 1D, multiple vectors.
-
RFFTMI: initialization for RFFTMB and RFFTMF.
-
SINQ1B: real backward sine quarter wave transform, 1D.
-
SINQ1F: real forward sine quarter wave transform, 1D.
-
SINQ1I: initialization for SINQ1B and SINQ1F.
-
SINQMB: real backward sine quarter wave transform, multiple vectors.
-
SINQMF: real forward sine quarter wave transform, multiple vectors.
-
SINQMI: initialization for SINQMB and SINQMF.
-
SINT1B: real backward sine transform, 1D.
-
SINT1F: real forward sine transform, 1D.
-
SINT1I: initialization for SINT1B and SINT1F.
-
SINTMB: real backward sine transform, multiple vectors.
-
SINTMF: real forward sine transform, multiple vectors.
-
SINTMI: initialization for SINTMB and SINTMF.
-
TABLES computes trigonometric tables needed by the FFT routines.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
XERCON checks INC, JUMP, N and LOT for consistency.
-
XERFFT is an error handler for the FFTPACK routines.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 17 November 2007.