You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed similar behavior with abs if you try to use the constructor by passing in a function. If , instead you create a Fun for x on your domain and then write your desired Fun in terms of x, all is well. This should help to narrow down the problem? Here is an example:
julia @v1.11> x = Fun()
Fun(Chebyshev(), [0.0, 1.0])
julia @v1.11> x = Fun(Chebyshev(-12..12))
Fun(Chebyshev(-12 .. 12), [0.0, 12.0])
julia @v1.11> for x0 in 4.7:0.05:5.1
fun = exp(-(x + x0)^2 / (1 / 12.0))
@show x0, length(fun.coefficients)
end
(x0, length(fun.coefficients)) = (4.7, 487)
(x0, length(fun.coefficients)) = (4.75, 487)
(x0, length(fun.coefficients)) = (4.8, 486)
(x0, length(fun.coefficients)) = (4.85, 485)
(x0, length(fun.coefficients)) = (4.9, 484)
(x0, length(fun.coefficients)) = (4.95, 483)
(x0, length(fun.coefficients)) = (5.0, 481)
(x0, length(fun.coefficients)) = (5.05, 480)
(x0, length(fun.coefficients)) = (5.1, 479)
julia @v1.11>
The following function requires north of 2 million Chebyshev coefficients to represent:
Fun(x -> exp(-12(x + 4.9)^2), Chebyshev(-12..12))
This is in contrast to the function's "neighbors", see as follows:
The text was updated successfully, but these errors were encountered: