Skip to content

Commit c1a680a

Browse files
docs for arxiv preprint
1 parent cedf5de commit c1a680a

File tree

7 files changed

+39
-30
lines changed

7 files changed

+39
-30
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.18"
3+
version = "0.3.19"
44

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

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://github.com/JuliaMath/HypergeometricFunctions.jl/workflows/CI/badge.svg)](https://github.com/JuliaMath/HypergeometricFunctions.jl/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/JuliaMath/HypergeometricFunctions.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaMath/HypergeometricFunctions.jl) [![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaMath.github.io/HypergeometricFunctions.jl/stable) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaMath.github.io/HypergeometricFunctions.jl/dev)
44

5-
This package implements the generalized hypergeometric function `pFq((α1,…,αp), (β1,…,βq), z)`. Please refer to the documentation for more information.
5+
This package provides an implementation of the generalized hypergeometric function `pFq((α1,…,αp), (β1,…,βq), z)`.
66

77
```julia
88
julia> using HypergeometricFunctions
@@ -23,3 +23,11 @@ julia> pFq((1, 2+im), (3.5, ), exp(im*π/3)) # ₂F₁ at that special point in
2323
0.6786952632946592 + 0.4523504929285015im
2424

2525
```
26+
27+
# References
28+
29+
[1] N. Michel and M. V. Stoitsov, [Fast computation of the Gauss hypergeometric function with all its parameters complex with application to the Pöschl–Teller–Ginocchio potential wave functions](https://doi.org/10.1016/j.cpc.2007.11.007), *Comp. Phys. Commun.*, **178**:535–551, 2008.
30+
31+
[2] J. W. Pearson, S. Olver and M. A. Porter, [Numerical methods for the computation of the confluent and Gauss hypergeometric functions](https://doi.org/10.1007/s11075-016-0173-0), *Numer. Algor.*, **74**:821–866, 2017.
32+
33+
[3] R. M. Slevinsky, [Fast and stable rational approximation of generalized hypergeometric functions](https://arxiv.org/abs/2307.06221), arXiv:2307.06221, 2023.

docs/src/index.md

+8-17
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,17 @@ z = x' .+ im*y
2222
2323
import Logging # To avoid printing warnings
2424
Logging.with_logger(Logging.SimpleLogger(Logging.Error)) do
25-
fz = map(z->pFq((), (), z), z)
26-
img = portrait(fz, ctype = "nist")
25+
img = portrait(map(z->pFq((), (), z), z), ctype = "nist")
2726
save("0F0.png", img)
28-
29-
fz = map(z->pFq((), (1.0, ), z), z)
30-
img = portrait(fz, ctype = "nist")
27+
img = portrait(map(z->pFq((), (1.0, ), z), z), ctype = "nist")
3128
save("0F1.png", img)
32-
33-
fz = map(z->pFq((0.5, ), (0.75, ), z), z)
34-
img = portrait(fz, ctype = "nist")
29+
img = portrait(map(z->pFq((0.5, ), (0.75, ), z), z), ctype = "nist")
3530
save("1F1.png", img)
36-
37-
fz = map(z->pFq((3.5+7.5im, ), (), z), z)
38-
img = portrait(fz, ctype = "nist")
31+
img = portrait(map(z->pFq((3.5+7.5im, ), (), z), z), ctype = "nist")
3932
save("1F0.png", img)
40-
41-
fz = map(z->pFq((1.0, 3.5+7.5im), (0.75, ), z), z)
42-
img = portrait(fz, ctype = "nist")
33+
img = portrait(map(z->pFq((1.0, 3.5+7.5im), (0.75, ), z), z), ctype = "nist")
4334
save("2F1.png", img)
44-
45-
fz = map(z->pFq((1.0, 1.5+7.5im), (), z), z)
46-
img = portrait(fz, ctype = "nist")
35+
img = portrait(map(z->pFq((1.0, 1.5+7.5im), (), z), z), ctype = "nist")
4736
save("2F0.png", img)
4837
end
4938
nothing # hide
@@ -71,6 +60,8 @@ HypergeometricFunctions.U
7160
HypergeometricFunctions._₂F₁positive
7261
HypergeometricFunctions._₂F₁general
7362
HypergeometricFunctions._₂F₁general2
63+
HypergeometricFunctions.pFqdrummond
64+
HypergeometricFunctions.pFqweniger
7465
HypergeometricFunctions.pFqcontinuedfraction
7566
HypergeometricFunctions.pochhammer
7667
HypergeometricFunctions.@clenshaw

src/drummond.jl

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
# Rational approximations to generalized hypergeometric functions
2-
# using Drummond's sequence transformation
1+
@doc raw"""
2+
pFqdrummond(α, β, z; kmax)
3+
Compute the generalized hypergeometric function [`pFq`](@ref) by rational approximations of type (k, k) generated by Drummond's sequence transformation described in
4+
5+
> R. M. Slevinsky, [Fast and stable rational approximation of generalized hypergeometric functions](https://arxiv.org/abs/2307.06221), arXiv:2307.06221, 2023.
6+
"""
7+
pFqdrummond
38

49
# ₀F₀(;z)
510
function pFqdrummond(::Tuple{}, ::Tuple{}, z::T; kmax::Int = KMAX) where T

src/gauss.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ end
7171
Compute the Gauss hypergeometric function `₂F₁(a, b, c; z)` with general parameters a, b, and c.
7272
This polyalgorithm is designed based on the paper
7373
74-
> N. Michel and M. V. Stoitsov, [Fast computation of the Gauss hypergeometric function with all its parameters complex with application to the Pöschl–Teller–Ginocchio potential wave functions](https://doi.org/10.1016/j.cpc.2007.11.007), Comp. Phys. Commun., 178:535–551, 2008.
74+
> N. Michel and M. V. Stoitsov, [Fast computation of the Gauss hypergeometric function with all its parameters complex with application to the Pöschl–Teller–Ginocchio potential wave functions](https://doi.org/10.1016/j.cpc.2007.11.007), *Comp. Phys. Commun.*, **178**:535–551, 2008.
7575
"""
7676
function _₂F₁general(a, b, c, z; kwds...)
7777
if z == 1
@@ -101,7 +101,7 @@ end
101101
Compute the Gauss hypergeometric function `₂F₁(a, b, c; z)` with general parameters a, b, and c.
102102
This polyalgorithm is designed based on the review
103103
104-
> J. W. Pearson, S. Olver and M. A. Porter, [Numerical methos for the computation of the confluent and Gauss hypergeometric functions](https://doi.org/10.1007/s11075-016-0173-0), Numer. Algor., 74:821–866, 2017.
104+
> J. W. Pearson, S. Olver and M. A. Porter, [Numerical methods for the computation of the confluent and Gauss hypergeometric functions](https://doi.org/10.1007/s11075-016-0173-0), *Numer. Algor.*, **74**:821–866, 2017.
105105
"""
106106
function _₂F₁general2(a, b, c, z)
107107
T = promote_type(typeof(a), typeof(b), typeof(c), typeof(z))

src/specialfunctions.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ogamma(x::Number) = (isinteger(x) && x<0) ? zero(float(x)) : inv(gamma(x))
5151
"""
5252
@clenshaw(x, c...)
5353
54-
Evaluate the Chebyshev polynomial series ``\\sum_{k=1}^N c[k] T_{k-1}(x)`` by the Clenshaw algorithm.
54+
Evaluate the Chebyshev polynomial series ``\\displaystyle \\sum_{k=1}^N c[k] T_{k-1}(x)`` by the Clenshaw algorithm.
5555
5656
External links: [DLMF](https://dlmf.nist.gov/3.11#ii), [Wikipedia](https://en.wikipedia.org/wiki/Clenshaw_algorithm).
5757
@@ -179,11 +179,11 @@ unsafe_gamma(z) = gamma(z)
179179
"""
180180
@lanczosratio(z, ϵ, c₀, c...)
181181
182-
Evaluate ``\\dfrac{\\sum_{k=0}^{N-1} \\frac{c[k+1]}{(z+k)(z+k+\\epsilon)}}{c_0 + \\sum_{k=0}^{N-1} \\frac{c[k+1]}{z+k}}`.
182+
Evaluate ``\\dfrac{\\displaystyle \\sum_{k=0}^{N-1} \\frac{c[k+1]}{(z+k)(z+k+\\epsilon)}}{\\displaystyle c_0 + \\sum_{k=0}^{N-1} \\frac{c[k+1]}{z+k}}``.
183183
184184
This ratio is used in the Lanczos approximation of ``\\log\\frac{\\Gamma(z+\\epsilon)}{\\Gamma(z)}`` in
185185
186-
> N. Michel and M. V. Stoitsov, [Fast computation of the Gauss hypergeometric function with all its parameters complex with application to the Pöschl–Teller–Ginocchio potential wave functions](https://doi.org/10.1016/j.cpc.2007.11.007), Comp. Phys. Commun., 178:535–551, 2008.
186+
> N. Michel and M. V. Stoitsov, [Fast computation of the Gauss hypergeometric function with all its parameters complex with application to the Pöschl–Teller–Ginocchio potential wave functions](https://doi.org/10.1016/j.cpc.2007.11.007), *Comp. Phys. Commun.*, **178**:535–551, 2008.
187187
"""
188188
macro lanczosratio(z, ϵ, c₀, c...)
189189
ex_num = :(zero(z))
@@ -228,7 +228,7 @@ end
228228
"""
229229
Compute the function ``\\dfrac{\\frac{1}{\\Gamma(z)}-\\frac{1}{\\Gamma(z+\\epsilon)}}{\\epsilon}`` by the method dscribed in
230230
231-
> N. Michel and M. V. Stoitsov, [Fast computation of the Gauss hypergeometric function with all its parameters complex with application to the Pöschl–Teller–Ginocchio potential wave functions](https://doi.org/10.1016/j.cpc.2007.11.007), Comp. Phys. Commun., 178:535–551, 2008.
231+
> N. Michel and M. V. Stoitsov, [Fast computation of the Gauss hypergeometric function with all its parameters complex with application to the Pöschl–Teller–Ginocchio potential wave functions](https://doi.org/10.1016/j.cpc.2007.11.007), *Comp. Phys. Commun.*, **178**:535–551, 2008.
232232
"""
233233
function G(z::Union{Float64, ComplexF64, Dual128, DualComplex256}, ϵ::Union{Float64, ComplexF64, Dual128, DualComplex256})
234234
n, zpϵ = round(Int, real(z)), z+ϵ
@@ -260,7 +260,7 @@ G(z::Number, ϵ::Number) = G(promote(z, ϵ)...)
260260
"""
261261
Compute the function ``\\dfrac{(z+\\epsilon)_m-(z)_m}{\\epsilon}`` by the method dscribed in
262262
263-
> N. Michel and M. V. Stoitsov, [Fast computation of the Gauss hypergeometric function with all its parameters complex with application to the Pöschl–Teller–Ginocchio potential wave functions](https://doi.org/10.1016/j.cpc.2007.11.007), Comp. Phys. Commun., 178:535–551, 2008.
263+
> N. Michel and M. V. Stoitsov, [Fast computation of the Gauss hypergeometric function with all its parameters complex with application to the Pöschl–Teller–Ginocchio potential wave functions](https://doi.org/10.1016/j.cpc.2007.11.007), *Comp. Phys. Commun.*, **178**:535–551, 2008.
264264
"""
265265
function P(z::Number, ϵ::Number, m::Int)
266266
n₀ = -round(Int, real(z))

src/weniger.jl

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
# Rational approximations to generalized hypergeometric functions
2-
# using Weniger's sequence transformation
1+
@doc raw"""
2+
pFqweniger(α, β, z; kmax, γ = 2)
3+
Compute the generalized hypergeometric function [`pFq`](@ref) by rational approximations of type (k, k) generated by a factorial Levin-type sequence transformation described in
4+
5+
> R. M. Slevinsky, [Fast and stable rational approximation of generalized hypergeometric functions](https://arxiv.org/abs/2307.06221), arXiv:2307.06221, 2023.
6+
"""
7+
pFqweniger
38

49
# ₀F₀(;z), γ = 2.
510
function pFqweniger(::Tuple{}, ::Tuple{}, z::T; kmax::Int = KMAX) where T

0 commit comments

Comments
 (0)