I need to do a convolution of BigInt
s and DSP
says that BigFloat
isn’t supported when I try.
You just need to load a package implementing a BigFloat
FFT, and then DSP.conv
will work. For example, using GenericFFT.jl:
julia> using DSP, GenericFFT
julia> setprecision(6); # lower the precision to reduce the amount of output below
julia> u, v = [rand(BigFloat, 10) for _=1:2]
2-element Vector{Vector{BigFloat}}:
[0.0156, 0.422, 0.812, 0.438, 0.125, 0.984, 0.109, 0.875, 0.812, 0.625]
[0.109, 0.5, 0.719, 0.797, 0.422, 0.0312, 0.938, 0.156, 0.469, 0.688]
julia> DSP.conv(u,v)
19-element Vector{BigFloat}:
-0.119
0.0298
0.484
0.766
1.75
1.19
1.53
1.59
2.31
2.38
2.5
2.88
1.25
1.69
1.59
1.03
1.28
0.688
0.594
4 Likes