Skip to content

Commit be2c99e

Browse files
add a positive₂F₁ for the incomplete beta function in stats
1 parent 2f42772 commit be2c99e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
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.8"
3+
version = "0.3.9"
44

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

src/HypergeometricFunctions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module HypergeometricFunctions
77

88
using DualNumbers, LinearAlgebra, SpecialFunctions
99

10-
export _₁F₁, _₂F₁, _₃F₂, pFq
10+
export _₁F₁, _₂F₁, _₃F₂, pFq, positive₂F₁
1111

1212
include("specialfunctions.jl")
1313
include("gauss.jl")

src/gauss.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ function mxa_₂F₁(a, b, c, z)
6464
return (-z)^a*_₂F₁(a, b, c, z)
6565
end
6666

67+
"""
68+
Compute the Gauss hypergeometric function `₂F₁(a, b; c; z)` with positive parameters a, b, and c and non-negative argument z. Useful for statisticians.
69+
"""
70+
function positive₂F₁(a, b, c, z)
71+
@assert a > 0 && b > 0 && c > 0 && 0 z 1
72+
return _₂F₁maclaurin(a, b, c, z)
73+
end
74+
6775
"""
6876
Compute the Gauss hypergeometric function `₂F₁(a, b; c; z)` with general parameters a, b, and c.
6977
This polyalgorithm is designed based on the paper

0 commit comments

Comments
 (0)