https://github.com/juliaapproximation/genericfft.jl
A package for computing the FFT with arbitrary floating point numbers
https://github.com/juliaapproximation/genericfft.jl
Last synced: 9 months ago
JSON representation
A package for computing the FFT with arbitrary floating point numbers
- Host: GitHub
- URL: https://github.com/juliaapproximation/genericfft.jl
- Owner: JuliaApproximation
- License: mit
- Created: 2022-07-19T09:55:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-27T06:30:09.000Z (over 1 year ago)
- Last Synced: 2025-02-23T04:35:22.883Z (over 1 year ago)
- Language: Julia
- Size: 287 KB
- Stars: 16
- Watchers: 9
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GenericFFT.jl
[](https://github.com/JuliaApproximation/GenericFFT.jl/actions?query=workflow%3ACI)
[](https://codecov.io/gh/JuliaApproximation/GenericFFT.jl)
[](https://JuliaApproximation.github.io/GenericFFT.jl/stable)
[](https://JuliaApproximation.github.io/GenericFFT.jl/dev)
[](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html)
`GenericFFT.jl` implements a Fast Fourier Transform for generic floating point number types.
The transforms provided have the right computational complexity. However, for the time being, the implementations are crude and far from optimal. Please consider contributing improvements to the package and filing issues for missing functionality.
## Installation
Installation is straightforward:
```julia
pkg> add GenericFFT
julia> using GenericFFT
```
## Usage for high-precision FFTs
The main reason for using `GenericFFT` is high-precision calculations. For example:
```julia
julia> using GenericFFT
julia> fft(rand(Complex{BigFloat}, 2))
2-element Vector{Complex{BigFloat}}:
0.8071607526060331187983248443648586158893950448440777116281652091029932491471374 + 1.058204007570364569492040922226041865648762106924785198005758849420721686004251im
0.3195699335469630499276014344115859560577992018210584550701583748039853943955188 + 0.196737316420669631800810230623687615407691727320510522950346182385847637522683im
```
Other packages provide high-precision floating point numbers, including [QuadMath.jl](https://github.com/JuliaMath/Quadmath.jl) and [DoubleFloats.jl](https://github.com/JuliaMath/DoubleFloats.jl).
```julia
julia> using GenericFFT, DoubleFloats
julia> fft(rand(Double64, 2))
2-element Vector{Complex{Double64}}:
0.4026739024263829 + 0.0im
0.3969515892883767 + 0.0im
```
## History
The code in this package was developed in the [FastTransforms.jl](https://github.com/JuliaApproximation/FastTransforms.jl) package by Mikael Slevinsky. The code was moved to a separate package in July 2022 from [this file](https://github.com/JuliaApproximation/FastTransforms.jl/blob/3bd5a9a2cf744fc26418fe999bbb151b5ccc6634/src/fftBigFloat.jl).