Path: blob/main/Modules/_decimal/libmpdec/literature/six-step.txt
12 views
12(* Copyright (c) 2011-2020 Stefan Krah. All rights reserved. *)345The Six Step Transform:6=======================78In libmpdec, the six-step transform is the Matrix Fourier Transform (See9matrix-transform.txt) in disguise. It is called six-step transform after10a variant that appears in [1]. The algorithm requires that the input11array can be viewed as an R*C matrix.121314Algorithm six-step (forward transform):15---------------------------------------16171a) Transpose the matrix.18191b) Apply a length R FNT to each row.20211c) Transpose the matrix.22232) Multiply each matrix element (addressed by j*C+m) by r**(j*m).24253) Apply a length C FNT to each row.26274) Transpose the matrix.2829Note that steps 1a) - 1c) are exactly equivalent to step 1) of the Matrix30Fourier Transform. For large R, it is faster to transpose twice and do31a transform on the rows than to perform a column transpose directly.32333435Algorithm six-step (inverse transform):36---------------------------------------37380) View the matrix as a C*R matrix.39401) Transpose the matrix, producing an R*C matrix.41422) Apply a length C FNT to each row.43443) Multiply each matrix element (addressed by i*C+n) by r**(i*n).45464a) Transpose the matrix.47484b) Apply a length R FNT to each row.49504c) Transpose the matrix.5152Again, steps 4a) - 4c) are equivalent to step 4) of the Matrix Fourier53Transform.54555657--5859[1] David H. Bailey: FFTs in External or Hierarchical Memory60http://crd.lbl.gov/~dhbailey/dhbpapers/6162636465