Skip to content

Commit bcf7ec9

Browse files
committed
test_7: adaptive_simpsons_rule, reducing epsilon to 1e-8
1 parent a8fc33d commit bcf7ec9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_7.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ sol_7 = log(sqrt(2)*exp(1)/(sqrt(exp(2)+1)))+1/2*(exp(-2)-1)+1/3*(1-exp(-3));
77
printstyled("Integrating (x^3+1)/(x^4 (x+1)(x^2+1)) from 1 to e and comparing the result to the analytical solution of log(sqrt(2)*exp(1)/(sqrt(exp(2)+1)))+1/2*(exp(-2)-1)+1/3*(1-exp(-3))\n"; color = :red)
88
@testset "partfrac" begin
99
printstyled("Running: adaptive_simpsons_rule with ε=1e-7\n"; color = :magenta)
10-
@time @test adaptive_simpsons_rule(partfrac, 1, exp(1), 1e-7) sol_7
10+
# epsilon = 1e-7, despite leading to an absolute and relative error < 1e-7
11+
# leads to the test failing
12+
@time @test adaptive_simpsons_rule(partfrac, 1, exp(1), 1e-8) sol_7
1113
printstyled("Running: chebyshev_quadrature with k=1\n"; color = :magenta)
1214
@time @test chebyshev_quadrature(partfrac, 8517, 1, 1, exp(1)) sol_7
1315
printstyled("Running: chebyshev_quadrature with k=2\n"; color = :magenta)

0 commit comments

Comments
 (0)