type-flexible FFTs?
I've raised this issue https://github.com/JuliaComputing/FourierTransforms.jl/issues/8#issue-495818536, which is about https://github.com/JuliaMath/AbstractFFTs.jl/blob/66695a72b2a29a059a9bf5fae51a3107172f146d/src/definitions.jl#L20-L22
In theory, FourierTransforms.jl should allow for a type-flexible FFT, i.e. fft(::Array{T,1}) where {T<:AbstractFloat}, but currently it doesn't. Would it be possible to change these lines thanks to the pure-Julia FourierTransforms.jl, which is not limited to Float32/Float64 (as for example FFTW is)?
Have you checked out https://github.com/JuliaApproximation/FastTransforms.jl? It has methods for FFT with arbitrary Julia types
Seems reasonable to make this more generic; it looks like a legacy of the days when FFTW was the only FFT.
@stevengj what was your experience like with FastTransforms.jl? I also need flexible types #35
@milankl did you find a solution? I also need flexible types #35
I haven't looked into it further. I assume that if you use FourierTransforms.jl, line 20 and 22 could simply be commented, but @stevengj should know better.
I've almost finished extending the AbstractFFTs methods for Array{TrackedReal} here https://github.com/gszep/FluxContinuation/blob/master/TrackedFFTs.jl could someone give me a pointer on how to extend plan_brfft? the TestPlan in runtests.jl was very helpful but there is no example for plan_brfft
@milankl I'm looking for an example (or examples) where FFT, IFFT is evaluated with Posits in particular with Poist16 (SoftPosit.jl)? It would be great if you can point me towards one
Technically this should work
julia> using SoftPosit, FastTransforms
julia> x = Posit16.(rand(8))
8-element Vector{Posit16}:
Posit16(0.6254883)
Posit16(0.7780762)
Posit16(0.8145752)
Posit16(0.50598145)
Posit16(0.74768066)
Posit16(0.29797363)
Posit16(0.89624023)
Posit16(0.6437988)
julia> fft(x)
ERROR: MethodError: no method matching maxintfloat(::Type{Posit16})
But it doesn't because I haven't implemented the necessary methods in SoftPosit.jl, so we should move this into an issue therein: https://github.com/milankl/SoftPosit.jl/issues/64
@milankl Great! Looking forward for the upgrade!