Open ioannisPApapadopoulos opened 11 months ago
GenericFFT.jl
try loading that it might just work
I thought GenericFFT was a mirror of the Fourier functionality in FastTransforms?
Did you try loading GenericFFT
? Here's an alternative that works in ApproxFun
julia> using ApproxFun, GenericFFT
julia> f = (r,θ)-> sin(100*r*cos(θ))
#19 (generic function with 1 method)
julia> S = Chebyshev(big"0.1"..big"1.0")⊗Fourier(big"0.0"..big"2.0"*π)
Chebyshev(0.1000000000000000000000000000000000000000000000000000000000000000000000000000002 .. 1.0) ⊗ Fourier(【0.0,6.283185307179586476925286766559005768394338798750211641949889184615632812572396❫)
julia> F = ProductFun(LowRankFun(f, S; gridx = 256, gridy = 256))
ProductFun on Chebyshev(0.1000000000000000000000000000000000000000000000000000000000000000000000000000002 .. 1.0) ⊗ Fourier(【0.0,6.283185307179586476925286766559005768394338798750211641949889184615632812572396❫)
julia> coefficients(F); # get the array of coefficients
julia> f(big"0.123", big"0.456")
-0.9988661226402205869689991698845071591411740075338145723676043325127213580466635
julia> F(big"0.123", big"0.456")
-0.998866122640220586968999169884507159141174007533814572367604332512721358046603
GenericFFT.jl
gives the same error when using ClassicalOrthogonalPolynomials.jl
but the ApproxFun
code does work. Thanks @MikaelSlevinsky
Odd as ApproxFunFourier.jl uses the exact same transform (FFTW.plan_r2r!(x, FFTW.HC2R)
)
So I'm confused how the ApproxFun code is working
Ah I see we special cased the transform for BigFloat
to call fft
:
Is there a way to work with Fourier and BigFloat? It goes via FFTW which is causing some issues.