We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9590d8c commit 35ff68eCopy full SHA for 35ff68e
src/function_hashing/chebhash.jl
@@ -49,13 +49,13 @@ function cheb_coefficients(f, N)
49
x = cos.(range(0, π, length=N))
50
fx = f.(x)
51
52
- dct(fx) * √(1/(2N))
+ dct(fx) * √(1/N)
53
end
54
55
function get_cheb_coefficients(interval::RealInterval, f; n_coeffs::Integer=1024)
56
f_ = squash_function(interval, f)
57
coeff = cheb_coefficients(f_, n_coeffs)
58
- coeff .* width(interval)
+ coeff .* √width(interval)
59
60
61
# Transform a function f ∈ L^2([a,b]) so that the coefficients of its Chebyshev
0 commit comments