Skip to content
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

Minor fixes around tests #114

Merged
merged 3 commits into from
Nov 1, 2022
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
@@ -1,6 +1,6 @@
name = "FastGaussQuadrature"
uuid = "442a2c76-b920-505d-bb47-c5924d526838"
version = "0.5.0-DEV"
version = "0.5.0"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
3 changes: 0 additions & 3 deletions test/test_besselroots.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import SpecialFunctions
import SpecialFunctions: besselj

@testset "Bessel Roots" begin
@test_throws DomainError approx_besselroots(0.0, -1)

Expand Down
2 changes: 0 additions & 2 deletions test/test_gausshermite.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FastGaussQuadrature

@testset "Gauss–Hermite" begin
@testset "Check error" begin
@test_throws DomainError gausshermite(-1)
Expand Down
14 changes: 7 additions & 7 deletions test/test_gausslaguerre.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Test gausslaguerre.jl

# Test integration
tol = 4.0e-10
tol = 1.0e-13

# Evaluate the exact integral of x^α * p(x) *exp(-x) on the positive halfline,
# where p(x) = sum( coef[i+1]*x^i, i=0..degree(p)) is a polynomial given by its
Expand Down Expand Up @@ -79,14 +79,14 @@ Random.seed!(0)
@test abs(dot(w, polyval(x, coef)) - Z)/abs(Z) < tol

x_gw, w_gw = FastGaussQuadrature.gausslaguerre_GW(n, α)
@test abs(x[37] - 98.388267163326702) < tol
@test abs(w[7] - 0.055372813167092) < tol
@test abs(dot(w, polyval(x, coef)) - Z)/abs(Z) < tol
@test abs(x_gw[37] - 98.388267163326702) < tol
@test abs(w_gw[7] - 0.055372813167092) < tol
@test abs(dot(w_gw, polyval(x_gw, coef)) - Z)/abs(Z) < tol

x_rec, w_rec = FastGaussQuadrature.gausslaguerre_rec(n, α)
@test abs(x[37] - 98.388267163326702) < tol
@test abs(w[7] - 0.055372813167092) < tol
@test abs(dot(w, polyval(x, coef)) - Z)/abs(Z) < tol
@test abs(x_rec[37] - 98.388267163326702) < tol
@test abs(w_rec[7] - 0.055372813167092) < tol
@test abs(dot(w_rec, polyval(x_rec, coef)) - Z)/abs(Z) < tol


α = 0.5
Expand Down
2 changes: 0 additions & 2 deletions test/test_gaussradau.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FastGaussQuadrature, Test

@testset "Gauss–Radau" begin
@testset "Check error" begin
@test_throws DomainError gaussradau(0)
Expand Down