Skip to content

Commit 86099dd

Browse files
authored
Merge branch 'master' into os/stabilize-Float32-functions
2 parents fcec1e5 + c6e3777 commit 86099dd

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/BesselFunctions/hankel.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ function besselh(nu::Real, k::Integer, x)
217217
end
218218
end
219219

220+
besselh(nu, x) = besselh(nu, 1, x)
221+
220222
function besselh(nu::AbstractRange, k::Integer, x::T) where T
221223
(nu[1] >= 0 && step(nu) == 1) || throw(ArgumentError("nu must be >= 0 with step(nu)=1"))
222224
if nu[end] < x

test/hankel_test.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,8 @@
3838
@test isapprox(hankelh1(1:50, T(100)), SpecialFunctions.hankelh1.(1:50, 100.0); 2*rtol)
3939
@test isapprox(hankelh2(1:50, T(10)), SpecialFunctions.hankelh2.(1:50, 10.0); rtol)
4040
@inferred hankelh2(1:50, T(10))
41+
42+
#test 2 arg version
43+
@test besselh(v, 1, x) == besselh(v, x)
44+
@test besselh(1:50, 1, T(10.0)) == besselh(1:50, T(10.0))
4145
end

0 commit comments

Comments
 (0)