Milan Klöwer
Milan Klöwer
@tkgunaratne let me know if there's anything else needed that we can include in v0.5 for FFTs with posits
That must be an explicit conversion as I deliberately do not define promotion between floats and posits ```julia julia> 1f0*Posit16(1) ERROR: promotion of types Float32 and Posit16 failed to change...
`sinpi` is missing ```julia Base.sinpi(x::T) where {T using FastTransforms julia> x = complex(Posit16.(randn(8))); julia> FastTransforms.generic_fft_pow2(x) 8-element Vector{Complex{Posit16}}: Posit16(3.8544922) + Posit16(0.0)im Posit16(2.0048828) - Posit16(2.7148438)im Posit16(-3.2929688) + Posit16(0.78149414)im Posit16(1.4091797) - Posit16(1.3051758)im Posit16(3.6767578)...
Forgot to add `Base.` ... https://github.com/milankl/SoftPosit.jl/blob/7f32549778bc21009d00417405439b4f0f1566ae/src/arithmetics.jl#L45-L49
We still can't do `isapprox(::Vector{Posit16},Vector{Posit16})` because ```julia julia> using .SoftPosit julia> using FastTransforms julia> x = complex(Posit16.(randn(8))) 8-element Vector{Complex{Posit16}}: Posit16(2.196289) + Posit16(0.0)im Posit16(0.31066895) + Posit16(0.0)im Posit16(0.6977539) + Posit16(0.0)im Posit16(1.1914062) +...
This https://github.com/JuliaDSP/FourierTransforms.jl looks like a generic not-just-power2 FFT implementation to me. It hasn't been touched in two years though. I think in general, we should probabaly try to push for...
Having said that, we soon need a generic FFT for [SpeedyWeather.jl](https://github.com/milankl/SpeedyWeather.jl) which currently uses `FFTW.rFFTWPlan{NF}` and `FFTW.rFFTWPlan{Complex{NF}}` from [FFTW.jl](https://github.com/JuliaMath/FFTW.jl) which only supports `NF=Float32/64`. But again the focus here would be...
I cannot reproduce this issue ```julia julia> using SoftPosit, GenericFFT julia> fft(Posit16.(randn(8))) 8-element Vector{Complex{Posit16}}: Posit16(-0.24487305) + Posit16(0.0)im Posit16(4.1367188) - Posit16(0.7182617)im Posit16(0.8757324) - Posit16(1.0927734)im Posit16(-1.3613281) + Posit16(0.60791016)im Posit16(0.2409668) + Posit16(0.0)im Posit16(-1.3603516)...
It seems that ```julia julia> using SoftPosit, GenericFFT julia> fft(Posit16.(randn(10))) ERROR: MethodError: no method matching Posit16(::Irrational{:π}) ``` is missing, which can quickly be added by conversion first to Float32/64 ```julia...
Yes, don't forget that there's two things here. 1) Get a generic fft to return a `Vector{Complex{T}}` for any-length `Vector{T}` that's provided as argument and 2) address precision and range...