Skip to content

Commit

Permalink
I think this was needed ???
Browse files Browse the repository at this point in the history
  • Loading branch information
jagoosw committed Nov 4, 2024
1 parent b424711 commit e392ac6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_interpolation.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using Walrus.Interpolations: Linear
using Walrus.Interpolations: Limited

@testset "Interpolaiton" begin
x = [0:10^-6:2π;]
y = cos.(x)

itp = SimpleInterpolation(x, y; mode = Linear())
itp = SimpleInterpolation(x, y; boundary_condition = Limited())

test_x = rand(0:10^-6:2π, 1000)

# atol is the Rolle theory maxiumum error for linear interpolation + a little
# atol is the Rolle theory maxiumum error for Limited interpolation + a little
@test all([isapprox(itp(x), cos(x), atol = 2 * abs(0.01^2 / 8 * cos(floor(x; digits = 2)))) for x in test_x])

test_x = rand(0:10^-6:4π, 1000)
Expand Down

0 comments on commit e392ac6

Please sign in to comment.