Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be doing regularised _2F1 #34

Open
dlfivefifty opened this issue Oct 9, 2020 · 1 comment
Open

Should be doing regularised _2F1 #34

dlfivefifty opened this issue Oct 9, 2020 · 1 comment

Comments

@dlfivefifty
Copy link
Member

_2F1 sucks compared to regularised _2F1 (bold F in https://dlmf.nist.gov/15.2 or Hypergeometric2F1Regularized in mathematica), as the regularised variant avoids the artificial polls at negative integers for c. We really should compute the regularised version and then define

_₂F₁(a, b, c, z) = gamma(c)*regularized_₂F₁(a, b, c, z)
@MikaelSlevinsky
Copy link
Collaborator

I think the reason I chose this way is because if you are near the origin you don't need to call gamma(c) as the Maclaurin series will do.

If we want to implement the regularized version of the Michiels & Stoitsov algorithm, we'd just need to scale these initial conditions by 1/gamma(c)

recInfα₀(a, b, c, m::Int, ϵ) = ϵ == 0 ? (-1)^m*gamma(m)*gamma(c)/(gamma(a+m)*gamma(c-a)) : gamma(c)/*gamma(1-m-ϵ)*gamma(a+m+ϵ)*gamma(c-a))
recInfβ₀(a, b, c, w, m::Int, ϵ) = abs(ϵ) > 0.1 ?
( pochhammer(float(a), m)*pochhammer(float(1-c+a), m)/(gamma(1-ϵ)*gamma(a+m+ϵ)*gamma(c-a)*gamma(m+1)) -
(-w)^ϵ*pochhammer(float(1-c+a)+ϵ, m)/(gamma(a)*gamma(c-a-ϵ)*gamma(m+1+ϵ)) )*gamma(c)*w^m/ϵ :

for example.

Possibly can be done for the rational algorithms too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants