Skip to content

Commit 5608f22

Browse files
close #69
This excludes the case where the 3-term recurrence collapses to a 2-term recurrence. This was caught by a previous test, so a specific test is added
1 parent 1ed19b0 commit 5608f22

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "HypergeometricFunctions"
22
uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a"
3-
version = "0.3.22"
3+
version = "0.3.23"
44

55
[deps]
66
DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"

src/gauss.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function _₂F₁general2(a, b, c, z; kwds...)
149149
elseif abs(z-0.5) > 0.5
150150
if isapprox(a, b) && !isapprox(c, a+0.5)
151151
return gamma(c)/gamma(a)/gamma(c-a)*(0.5-z)^(-a)*_₂F₁continuationalt(a, c, 0.5, z; kwds...)
152-
elseif a-b
152+
elseif a-b && !isapprox(2c, a+b+1)
153153
return gamma(c)*(gamma(b-a)/gamma(b)/gamma(c-a)*(0.5-z)^(-a)*_₂F₁continuation(a, a+b, c, 0.5, z; kwds...) + gamma(a-b)/gamma(a)/gamma(c-b)*(0.5-z)^(-b)*_₂F₁continuation(b, a+b, c, 0.5, z; kwds...))
154154
end
155155
end

test/runtests.jl

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ end
6363
j += 1
6464
end
6565
end
66+
@test _₂F₁general(-0.4, 0.4, 0.5, 0.75+0.75im) _₂F₁general2(-0.4, 0.4, 0.5, 0.75+0.75im)
6667
end
6768

6869
@testset "Test that _₂F₁ is inferred for Float32 arguments" begin

0 commit comments

Comments
 (0)