From f0fa05284eccefe342ea2a9269ce93862ec5ecaf Mon Sep 17 00:00:00 2001 From: zymon Date: Tue, 11 Jun 2024 14:57:43 +0200 Subject: [PATCH] rm random stuff --- random/sinc.jl | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 random/sinc.jl diff --git a/random/sinc.jl b/random/sinc.jl deleted file mode 100644 index 08d6f4f..0000000 --- a/random/sinc.jl +++ /dev/null @@ -1,28 +0,0 @@ -# @INFO: there is no SIMD version for sinc (sinpi etc.) -# We need a sinc kernel that can be SIMD vectorized -# Below is a sinple comparision of accuracy between a few approaches -using GLMakie - -pix(x) = π * x -sinc2(x) = x |> pix |> (x -> iszero(x) ? 1.0 : sin(x)/x) -sinc3(x) = x |> pix |> (x -> x + eps(x)) |> (x -> sin(x)/x) - - -fs = 480e3 -Δt = 1 / fs -t = -0.5:Δt:0.5 -y_sinc = t .|> sinc; -y_sinc2 = t .|> sinc2; -y_sinc3 = t .|> sinc3; - - -@show maximum(abs, y_sinc .- y_sinc2) -@show maximum(abs, y_sinc .- y_sinc3) - -fig = Figure() -ax = Axis(fig[1, 1]) -lines!(ax, t, abs.(y_sinc - y_sinc2) .|> log10; label="if sinc") -lines!(ax, t, abs.(y_sinc - y_sinc3) .|> log10; label="eps sinc") -ylims!(ax, -16, -12) -xlims!(ax, (t |> extrema)...) -axislegend(ax)