Skip to content

Commit

Permalink
Fix doctests on Julia 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
jipolanco committed Feb 19, 2024
1 parent fea3af4 commit 915fe43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/SplineInterpolations/SplineInterpolations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ julia> (Derivative(1) * S)(-1)
-0.01663433622896893
julia> (Derivative(2) * S)(-1)
10.52727328755495
10.527273287554928
julia> Snat = interpolate(xs, ys, BSplineOrder(4), Natural())
SplineInterpolation containing the 21-element Spline{Float64}:
Expand All @@ -212,10 +212,10 @@ julia> Snat(-1)
-1.0
julia> (Derivative(1) * Snat)(-1)
0.28726186708894824
0.2872618670889516
julia> (Derivative(2) * Snat)(-1)
0.0
-3.33066907387547e-14
```
Expand All @@ -235,7 +235,7 @@ SplineInterpolation containing the 20-element Spline{Float64}:
basis: 20-element PeriodicBSplineBasis of order 4, domain [-1.0, 1.0), period 2.0
order: 4
knots: [..., -1.2, -1.1, -1.0, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3 … 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, ...]
coefficients: [..., -1.01659, -0.96683, -0.822435, -0.597534, -0.314142, 1.10589e-17, 0.314142, 0.597534, 0.822435, 0.96683, 1.01659, 0.96683, 0.822435, 0.597534, 0.314142, 3.90313e-18, -0.314142, -0.597534, -0.822435, -0.96683, ...]
coefficients: [..., -1.01659, -0.96683, -0.822435, -0.597534, -0.314142, 1.10589e-17, 0.314142, 0.597534, 0.822435, 0.96683, 1.01659, 0.96683, 0.822435, 0.597534, 0.314142, 1.51788e-17, -0.314142, -0.597534, -0.822435, -0.96683, ...]
interpolation points: -1.0:0.1:0.9
```
Expand All @@ -244,7 +244,7 @@ function ``f(x) = \\cos(πx)`` near the boundaries than the other interpolations
```jldoctest interpolate
julia> x = -0.99; cospi(x), Sper(x), Snat(x), S(x)
(-0.9995065603657316, -0.9995032595823043, -0.9971071640321146, -0.9996420091470221)
(-0.9995065603657316, -0.9995032595823043, -0.9971071640321145, -0.9996420091470221)
julia> x = 0.998; cospi(x), Sper(x), Snat(x), S(x)
(-0.9999802608561371, -0.9999801044078943, -0.9994253145274461, -1.0000122303614758)
Expand Down

0 comments on commit 915fe43

Please sign in to comment.