Skip to content

Test for inference using BigFloat interval in Chebyshev #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ApproxFunOrthogonalPolynomialsPolynomialsExt = "Polynomials"
ApproxFunOrthogonalPolynomialsStaticExt = "Static"

[compat]
ApproxFunBase = "0.8.60, 0.9.16"
ApproxFunBase = "0.8.63, 0.9.21"
ApproxFunBaseTest = "0.1"
Aqua = "0.8"
BandedMatrices = "0.16, 0.17, 1"
Expand Down
26 changes: 7 additions & 19 deletions test/ChebyshevTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,6 @@ include("testutils.jl")
end
end

@testset "other domains" begin
ef = Fun(exp,1..2)
cf = Fun(cos,1..2)

ecf = Fun(x->cos(x).*exp(x),1..2)
eocf = Fun(x->cos(x)./exp(x),1..2)

x=1.5
@test ef(x) ≈ exp(x)

r=rand(100) .+ 1
@test maximum(abs,ef.(r)-exp.(r))<400eps()
@test maximum(abs,ecf.(r).-cos.(r).*exp.(r))<100eps()

@testset "setdomain" begin
@test setdomain(NormalizedChebyshev(0..1), 1..2) == NormalizedChebyshev(1..2)
end
end

@testset "Other interval" begin
ef = Fun(exp,1..2)
cf = Fun(cos,1..2)
Expand All @@ -170,6 +151,13 @@ include("testutils.jl")

@test sum(ef) ≈ 4.670774270471604
@test norm(ef) ≈ 4.858451087240335

@testset "setdomain" begin
@test setdomain(NormalizedChebyshev(0..1), 1..2) == NormalizedChebyshev(1..2)
end

fexp = @inferred Fun(exp, Chebyshev(big(-1.0) .. big(1.0)))
@test fexp(0.5) ≈ exp(big(0.5))
end

@testset "Roots" begin
Expand Down