rotex__hypergeometric Module

For calculating the Gauss hypergeometric function ₂F₁(a,b;c;z)



Functions

public impure elemental function f21_dispatch(za, zb, zc, z, ts_tol) result(res)

Checks if x is indeed in (0,1/2), and then makes a choice of evaluating the ODE (large a,b,c) or defaulting to the usual Taylor series

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: za
complex(kind=dp), intent(in) :: zb
complex(kind=dp), intent(in) :: zc
complex(kind=dp), intent(in) :: z
real(kind=dp), intent(in), optional :: ts_tol

Return Value complex(kind=dp)

public pure elemental function f21_ts(a, b, c, z, tol) result(res)

Returns the Gauss hypergeometric function ₂F₁(a,b,;c;z) via a Taylor series method, with quad precision

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: a
complex(kind=dp), intent(in) :: b
complex(kind=dp), intent(in) :: c
complex(kind=dp), intent(in) :: z
real(kind=dp), intent(in), optional :: tol

The tolerance for which must be met for the series to be considered converged. If this is not supplied, this value will be taken to be machine epsilon macheps_dp from the hypergeometric__constants module.

Return Value complex(kind=dp)

public impure elemental module function f21(a, b, c, x) result(res)

Returns one of the following transforms 1. ₂F₁(a,b;c;x) = (1-x)^{-b} ₂F₁(b,c-a;c;x/(x-1)) 2. ₂F₁(a,b;c;x) = (1-x)^{-a} ₂F₁(a,c-b;c;x/(x-1)) 3. ₂F₁(a,b;c;x) = (1-x)^{-a} Γ(c)Γ(b-a)/(Γ(b)Γ(c-a)) ₂F₁(a,c-b;a-b+1;1/(1-x)) + (1-x)^{-b} Γ(c)Γ(a-b)/(Γ(a)Γ(c-b)) ₂F₁(b,c-a;b-a+1;1/(1-x)) 4. ₂F₁(a,b;c;x) = Γ(c)Γ(c-a-b)/Γ(c-a)Γ(c-b) ₂F₁(c-a, c-b, c-a-b+1, 1-x) + (1-x)^(c-a-b) Γ(c)Γ(a+b-c)/Γ(a)Γ(b) ₂F₁(c-a,c-b;c-a-b+1;1-x) Regions of validity: 1. |a| < |b|, -1 ≤ x < 0 2. |a| > |b|, -1 ≤ x < 0 3. -∞ < x < -1 4. ½ < x < 1

Read more…

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: a
complex(kind=dp), intent(in) :: b
complex(kind=dp), intent(in) :: c
real(kind=dp), intent(in) :: x

Return Value complex(kind=dp)