Skip to content

Commit

Permalink
Fx print lines for adapt simps lines I've red eps for; upd comp time …
Browse files Browse the repository at this point in the history
…data
  • Loading branch information
fusion809 committed Jul 26, 2020
1 parent bcf7ec9 commit 48a2024
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FunctionIntegrator"
uuid = "7685536e-2581-4f83-bef1-2ba363c9cb91"
authors = ["Brenton Horne <[email protected]>"]
version = "0.5.0"
version = "0.5.1"

[deps]
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Taken from https://travis-ci.com/github/fusion809/FunctionIntegrator.jl/jobs/364132770
# Taken from https://travis-ci.com/github/fusion809/FunctionIntegrator.jl/jobs/365077894
# 10th entry is simppen
L_adaptive_simpsons = [0.486231; 0.064895; 0.000165; 0.037012; 0.032331; 0.030399; 0.023287; 0.023555; 0.099551; 9.451517; 0.039571; 0.000751; 0.000284];
L_chebyshev1 = [0.999828; 0.378005; 0.044058; 0.080038; 0.098033; 0.088635; 0.083370; 0.083933; 0.060513; 0.329102; 0.085079; 0.046761; 0.043942];
L_chebyshev2 = [0.122684; 0.060723; 0.043665; 0.116662; 0.095775; 0.125398; 0.100822; 0.099486; 0.062181; 8.654814; 0.085809; 0.049589; 0.044264];
L_chebyshev3 = [0.148326; 0.069086; 0.048887; 0.093295; 0.092409; 0.098670; 0.106251; 0.107016; 0.067388; 3.168286; 0.084671; 0.054494; 0.049837];
L_chebyshev4 = [0.197283; 0.067486; 0.048484; 0.109152; 0.105551; 0.098708; 0.093042; 0.091734; 0.084706; 4.084928; 0.084922; 0.052913; 0.049484];
L_jacobi = [20.378879; 0.535539; 0.078133; 0.481214; 0.225388; 2.794902; 0.530739; 0.424725; 0.459931; 21.860716; 0.155370; 1.836021; 0.575570];
L_legendre = [0.101542; 0.070673; 0.030698; 0.075401; 0.099265; 0.075489; 0.070451; 0.075890; 0.040959; 4.348325; 0.056232; 0.033010; 0.030431];
L_lobatto = [0.178613; 0.011121; 0.000107; 0.094005; 0.119870; 0.115679; 0.082939; 0.077295; 0.000196; 21.474618; 0.026952; 0.000390; 0.000152];
L_radau = [0.134821; 0.011121; 0.000051; 0.081257; 0.124391; 0.103346; 0.084129; 0.078259; 0.000089; 22.084138; 0.024211; 0.000374; 0.000090];
L_rectangle_midpoint = [0.074212; 0.000018; 0.000260; 0.018878; 0.020378; 0.019273; 0.018416; 0.018761; 0.000029; 1.586260; 0.028527; 0.000580; 0.000712];
L_rombergs = [0.458671; 0.224695; 0.042407; 0.070613; 0.068976; 0.073960; 0.085664; 0.072760; 0.066720; 0.558451; 0.137821; 0.038345; 0.043788];
L_simpsons = [0.024996; 0.000024; 0.000014; 0.020277; 0.030296; 0.022534; 0.020241; 0.023021; 0.000033; 13.500102; 0.001098; 0.000061; 0.000051];
L_simpsons38 = [0.053542; 0.040926; 0.000011; 0.023485; 0.033142; 0.025603; 0.023186; 0.038315; 0.018009; 13.818143; 0.041548; 0.000095; 0.000150];
L_trapezoidal = [0.150540; 0.035154; 0.000469; 0.016305; 0.022002; 0.017666; 0.015459; 0.017220; 0.012025; 12.852069; 0.082628; 0.001076; 0.001369];
L_adaptive_simpsons = [0.455044; 0.051227; 0.000142; 0.037223; 0.031272; 0.027268; 0.032873; 0.024794; 0.092391; 11.442810; 0.040696; 0.001140; 0.000531];
L_chebyshev1 = [1.009558; 0.335515; 0.044585; 0.081733; 0.091252; 0.087307; 0.082136; 0.102419; 0.060185; 0.339226; 0.086334; 0.046033; 0.043327];
L_chebyshev2 = [0.132044; 0.066955; 0.045266; 0.095766; 0.112055; 0.103432; 0.098146; 0.110522; 0.063643; 8.680677; 0.092204; 0.048493; 0.042964];
L_chebyshev3 = [0.220306; 0.071286; 0.051752; 0.137612; 0.093434; 0.116630; 0.104549; 0.099629; 0.067163; 3.208961; 0.091863; 0.053932; 0.048825];
L_chebyshev4 = [0.136945; 0.070568; 0.051149; 0.092509; 0.092965; 0.098516; 0.093687; 0.112979; 0.065209; 4.127343; 0.091688; 0.052680; 0.048865];
L_jacobi = [20.866783; 0.489243; 0.078353; 0.543790; 0.219776; 2.871823; 0.514692; 0.425720; 0.474459; 21.683630; 0.164953; 1.855387; 0.561469];
L_legendre = [0.106171; 0.078795; 0.031839; 0.074370; 0.074632; 0.077306; 0.074217; 0.069197; 0.041277; 4.304367; 0.059233; 0.032885; 0.030395];
L_lobatto = [0.190303; 0.012930; 0.000149; 0.085664; 0.140379; 0.115814; 0.095905; 0.090178; 0.000142; 21.309380; 0.026758; 0.000402; 0.000159];
L_radau = [0.141603; 0.022506; 0.000051; 0.086428; 0.110123; 0.099484; 0.090253; 0.079221; 0.000128; 21.947621; 0.024431; 0.000389; 0.000146];
L_rectangle_midpoint = [0.073207; 0.000017; 0.000273; 0.018856; 0.020056; 0.019106; 0.018988; 0.018468; 0.000033; 1.635390; 0.029941; 0.000537; 0.000739];
L_rombergs = [0.502167; 0.249403; 0.043215; 0.076397; 0.084500; 0.065737; 0.083264; 0.070981; 0.062676; 0.559453; 0.139889; 0.037316; 0.041226];
L_simpsons = [0.025735; 0.000020; 0.000016; 0.021620; 0.029775; 0.023050; 0.024037; 0.022381; 0.000023; 13.338188; 0.001048; 0.000050; 0.000041];
L_simpsons38 = [0.055831; 0.042373; 0.000011; 0.025192; 0.031424; 0.025814; 0.025907; 0.024228; 0.016936; 13.800786; 0.039795; 0.000060; 0.000034];
L_trapezoidal = [0.152162; 0.036755; 0.000453; 0.017747; 0.021522; 0.018655; 0.018124; 0.015779; 0.012151; 12.730575; 0.082469; 0.000966; 0.001362];
N = length(L_simpsons);

# RMS of times
Expand Down
2 changes: 1 addition & 1 deletion test/sinxx.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sol_8 = 1.562225466889056293352345138804502677227824980541083456384;

printstyled("Integrating sin(x)/x from 0 to 100 and comparing it to the exact result.\n"; color = :red)
@testset "sinxx" begin
printstyled("Running: adaptive_simpsons_rule with ε=1e-7\n"; color = :magenta)
printstyled("Running: adaptive_simpsons_rule with ε=1e-8\n"; color = :magenta)
# Using 1e-7 returns and error, despite it being accurate to an absolute and
# relative tolerance of 1e-7
@time @test adaptive_simpsons_rule(sinxx, 0, 100, 1e-8) sol_8
Expand Down
2 changes: 1 addition & 1 deletion test/test_7.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sol_7 = log(sqrt(2)*exp(1)/(sqrt(exp(2)+1)))+1/2*(exp(-2)-1)+1/3*(1-exp(-3));

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)
@testset "partfrac" begin
printstyled("Running: adaptive_simpsons_rule with ε=1e-7\n"; color = :magenta)
printstyled("Running: adaptive_simpsons_rule with ε=1e-8\n"; color = :magenta)
# epsilon = 1e-7, despite leading to an absolute and relative error < 1e-7
# leads to the test failing
@time @test adaptive_simpsons_rule(partfrac, 1, exp(1), 1e-8) sol_7
Expand Down

2 comments on commit 48a2024

@fusion809
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/18459

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.1 -m "<description of version>" 48a20244aff79e5983b29654c04b6d6f13b94622
git push origin v0.5.1

Please sign in to comment.