diff --git a/docs/Project.toml b/docs/Project.toml index 2e35e929..81319fa3 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,6 +1,10 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" +[sources] +SpecialFunctions = {path = ".."} + [compat] -Documenter = "~0.27" +Documenter = "1" diff --git a/docs/make.jl b/docs/make.jl index ff36a922..48ca1982 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,7 +1,14 @@ using SpecialFunctions, Documenter +using DocumenterCitations # `using SpecialFunctions` for all doctests DocMeta.setdocmeta!(SpecialFunctions, :DocTestSetup, :(using SpecialFunctions); recursive=true) + +bib = CitationBibliography( + joinpath(@__DIR__, "src", "refs.bib"); + style = :authoryear, +) + makedocs(modules=[SpecialFunctions], sitename="SpecialFunctions.jl", authors="Jeff Bezanson, Stefan Karpinski, Viral B. Shah, et al.", @@ -9,7 +16,8 @@ makedocs(modules=[SpecialFunctions], pages=["Home" => "index.md", "Overview" => "functions_overview.md", "Reference" => "functions_list.md"], - #warnonly=[:missing_docs], + plugins=[bib], + checkdocs=:exports, ) deploydocs(repo="github.com/JuliaMath/SpecialFunctions.jl.git") diff --git a/docs/src/functions_list.md b/docs/src/functions_list.md index dc595591..5890373f 100644 --- a/docs/src/functions_list.md +++ b/docs/src/functions_list.md @@ -151,3 +151,7 @@ ellipe eta zeta ``` + +## Citations +```@bibliography +``` diff --git a/docs/src/functions_overview.md b/docs/src/functions_overview.md index ca22f5ac..6cea9b02 100644 --- a/docs/src/functions_overview.md +++ b/docs/src/functions_overview.md @@ -15,17 +15,17 @@ Here the *Special Functions* are listed according to the structure of [NIST Digi | [`digamma(x)`](@ref SpecialFunctions.digamma) | [digamma function](https://en.wikipedia.org/wiki/Digamma_function) (i.e. the derivative of `loggamma` at `x`) | | [`invdigamma(x)`](@ref SpecialFunctions.invdigamma) | [invdigamma function](http://bariskurt.com/calculating-the-inverse-of-digamma-function/) (i.e. inverse of `digamma` function at `x` using fixed-point iteration algorithm) | | [`trigamma(x)`](@ref SpecialFunctions.trigamma) | [trigamma function](https://en.wikipedia.org/wiki/Trigamma_function) (i.e the logarithmic second derivative of `gamma` at `x`) | -| [`polygamma(m,x)`](@ref SpecialFunctions.polygamma) | [polygamma function](https://en.wikipedia.org/wiki/Polygamma_function) (i.e the (m+1)-th derivative of the `loggamma` function at `x`) | +| [`polygamma(m,x)`](@ref SpecialFunctions.polygamma) | [polygamma function](https://en.wikipedia.org/wiki/Polygamma_function) (i.e the ``(m+1)``-th derivative of the `loggamma` function at `x`) | | [`gamma(a,z)`](@ref SpecialFunctions.gamma(::Number,::Number)) | [upper incomplete gamma function ``\Gamma(a,z)``](https://en.wikipedia.org/wiki/Incomplete_gamma_function) | | [`loggamma(a,z)`](@ref SpecialFunctions.loggamma(::Number,::Number)) | accurate `log(gamma(a,x))` for large arguments | -| [`gamma_inc(a,x,IND)`](@ref SpecialFunctions.gamma_inc) | [incomplete gamma function ratio P(a,x) and Q(a,x)](https://en.wikipedia.org/wiki/Incomplete_gamma_function) (i.e evaluates P(a,x) and Q(a,x) for accuracy specified by IND and returns tuple (p,q)) | -| [`gamma_inc_inv(a,p,q)`](@ref SpecialFunctions.gamma_inc_inv) | [inverse of incomplete gamma function ratio P(a,x) and Q(a,x)](https://en.wikipedia.org/wiki/Incomplete_gamma_function) (i.e evaluates x given P(a,x)=p and Q(a,x)=q) | +| [`gamma_inc(a,x,IND)`](@ref SpecialFunctions.gamma_inc) | [incomplete gamma function ratio ``P(a,x)`` and ``Q(a,x)``](https://en.wikipedia.org/wiki/Incomplete_gamma_function) (i.e evaluates ``P(a,x)`` and ``Q(a,x)`` for accuracy specified by IND and returns tuple (p,q)) | +| [`gamma_inc_inv(a,p,q)`](@ref SpecialFunctions.gamma_inc_inv) | [inverse of incomplete gamma function ratio ``P(a,x)`` and ``Q(a,x)``](https://en.wikipedia.org/wiki/Incomplete_gamma_function) (i.e evaluates x given ``P(a,x)=p`` and ``Q(a,x)=q``) | | [`beta(x,y)`](@ref SpecialFunctions.beta) | [beta function](https://en.wikipedia.org/wiki/Beta_function) at `x,y` | | [`logbeta(x,y)`](@ref SpecialFunctions.logbeta) | accurate `log(beta(x,y))` for large `x` or `y` | | [`logabsbeta(x,y)`](@ref SpecialFunctions.logabsbeta) | accurate `log(abs(beta(x,y)))` for large `x` or `y` | | [`logabsbinomial(x,y)`](@ref SpecialFunctions.logabsbinomial) | accurate `log(abs(binomial(n,k)))` for large `n` and `k` near `n/2` | -| [`beta_inc(a,b,x,y)`](@ref SpecialFunctions.beta_inc) | [incomplete beta function ratio Ix(a,b) and Iy(a,b)](https://en.wikipedia.org/wiki/Beta_function#Incomplete_beta_function) (i.e evaluates Ix(a,b) and Iy(a,b) and returns tuple (p,q)) | -| [`beta_inc_inv(a,b,p,q)`](@ref SpecialFunctions.beta_inc_inv) | Inverse of the incomplete beta function (i.e evaluates x given ``I_{x}(a, b) = p``) | +| [`beta_inc(a,b,x,y)`](@ref SpecialFunctions.beta_inc) | [incomplete beta function ratio ``I_x(a,b)`` and ``I_y(a,b)``](https://en.wikipedia.org/wiki/Beta_function#Incomplete_beta_function) (i.e evaluates ``I_x(a,b)`` and ``I_y(a,b)`` and returns tuple (p,q)) | +| [`beta_inc_inv(a,b,p,q)`](@ref SpecialFunctions.beta_inc_inv) | Inverse of the incomplete beta function (i.e evaluates ``x`` given ``I_{x}(a, b) = p``) | ## Exponential and Trigonometric Integrals diff --git a/docs/src/refs.bib b/docs/src/refs.bib new file mode 100644 index 00000000..a895e1fe --- /dev/null +++ b/docs/src/refs.bib @@ -0,0 +1,171 @@ +@article{berry_1990, + title = {Algorithm AS R83: A Remark on Algorithm AS 109: Inverse of the Incomplete Beta Function Ratio}, + ISSN = {00359254, 14679876}, + URL = {http://www.jstor.org/stable/2347779}, + author = {K. J. Berry and P. W. Mielke and G. W. Cran}, + journal = {Journal of the Royal Statistical Society. Series C (Applied Statistics)}, + number = {2}, + pages = {309--310}, + publisher = {Royal Statistical Society, Oxford University Press}, + volume = {39}, + year = {1990} +} + +@article{blair_1976, + title = {Rational Chebyshev Approximations for the Inverse of the Error Function}, + author = {Blair, J. M. and Edwards, C. A. and Johnson, J. H.}, + date = {1976}, + year = {1976}, + journal = {Mathematics of Computation}, + shortjournal = {Math. Comp.}, + volume = {30}, + number = {136}, + pages = {827--830}, + issn = {0025-5718, 1088-6842}, + doi = {10.1090/S0025-5718-1976-0421040-7}, + url = {https://www.ams.org/mcom/1976-30-136/S0025-5718-1976-0421040-7/}, + langid = {english} +} + +@article{brent_1978, + title = {A Fortran Multiple-Precision Arithmetic Package}, + author = {Brent, Richard P.}, + date = {1978-03}, + year = {1978}, + journal = {ACM Transactions on Mathematical Software}, + shortjournal = {ACM Trans. Math. Softw.}, + volume = {4}, + number = {1}, + pages = {57--70}, + issn = {0098-3500, 1557-7295}, + doi = {10.1145/355769.355775}, + url = {https://dl.acm.org/doi/10.1145/355769.355775}, + langid = {english} +} + +@article{cran_1977, + title = {Remark AS R19 and Algorithm AS 109: A Remark on Algorithms: AS 63: The Incomplete Beta Integral AS 64: Inverse of the Incomplete Beta Function Ratio}, + author = {Cran, G. W. and Martin, K. J. and Thomas, G. E.}, + journal = {Journal of the Royal Statistical Society. Series C (Applied Statistics)}, + number = {1}, + issn = {00359254, 14679876}, + url = {http://www.jstor.org/stable/2346887}, + pages = {111--114}, + publisher = {Royal Statistical Society, Oxford University Press}, + volume = {26}, + year = {1977} +} + +@article{chattamvelli_1997, + title = {Computing the Non-Central Beta Distribution Function}, + author = {Chattamvelli, R. and Shanmugam, F.}, + date = {1997-03-01}, + year = {1997}, + journal = {Journal of the Royal Statistical Society Series C: Applied Statistics}, + volume = {46}, + number = {1}, + pages = {146--156}, + issn = {0035-9254, 1467-9876}, + doi = {10.1111/1467-9876.00055}, + url = {https://academic.oup.com/jrsssc/article/46/1/146/6990591}, + langid = {english} +} + +@article{didonato_1986, + title = {Computation of the incomplete gamma function ratios and their inverse}, + author = {DiDonato, Armido R and Morris, Alfred H}, + volume = {12}, + issn = {0098-3500, 1557-7295}, + url = {https://dl.acm.org/doi/10.1145/22721.23109}, + doi = {10.1145/22721.23109}, + abstract = {An algorithm is given for computing the incomplete gamma function ratios $P(a, x)$ and $Q(a, x)$ for $a \geq 0$, $x \geq 0$, $a + x \neq 0$. Temme's uniform asymptotic expansions are used. The algorithm is robust; results accurate to 14 significant digits can be obtained. An' extensive set of coefficients for the Temme expansions is included. An algorithm, employing third-order Schröder iteration supported by Newton-Raphson iteration, is provided for computing $x$ when $a$, $P(a, x)$, and $Q(a, x)$ are given. Three iterations at most are required to obtain 10 significant digit accuracy for $x$.}, + language = {en}, + number = {4}, + urldate = {2025-03-08}, + journal = {ACM Transactions on Mathematical Software}, + month = dec, + year = {1986}, + pages = {377--393}, +} + + +@article{didonato_1992, + title = {Algorithm 708: Significant Digit Computation of the Incomplete Beta Function Ratios}, + shorttitle = {Algorithm 708}, + author = {Didonato, Armido R. and Morris, Alfred H.}, + date = {1992-09}, + year = {1992}, + journal = {ACM Transactions on Mathematical Software}, + shortjournal = {ACM Trans. Math. Softw.}, + volume = {18}, + number = {3}, + pages = {360--373}, + issn = {0098-3500, 1557-7295}, + doi = {10.1145/131766.131776}, + url = {https://dl.acm.org/doi/10.1145/131766.131776}, + langid = {english} +} + +@article{fukushima_2009, + title = {Fast Computation of Complete Elliptic Integrals and Jacobian Elliptic Functions}, + author = {Fukushima, Toshio}, + date = {2009-12}, + year = {2009}, + journal = {Celestial Mechanics and Dynamical Astronomy}, + shortjournal = {Celest. Mech. Dyn. Astr.}, + volume = {105}, + number = {4}, + pages = {305--328}, + issn = {0923-2958, 1572-9478}, + doi = {10.1007/s10569-009-9228-z}, + url = {http://link.springer.com/10.1007/s10569-009-9228-z}, + langid = {english} +} + +@article{fukushima_2015, + title = {Precise and Fast Computation of Complete Elliptic Integrals by Piecewise Minimax Rational Function Approximation}, + author = {Fukushima, Toshio}, + date = {2015-07}, + year = {2015}, + journal = {Journal of Computational and Applied Mathematics}, + volume = {282}, + pages = {71--76}, + issn = {03770427}, + doi = {10.1016/j.cam.2014.12.038}, + url = {https://www.sciencedirect.com/science/article/pii/S0377042715000023}, + langid = {english} +} + +@article{lenth_1987, + title = {Algorithm AS 226: Computing Noncentral Beta Probabilities}, + shorttitle = {Algorithm AS 226}, + author = {Lenth, Russell V.}, + date = {1987}, + year = {1987}, + journal = {Applied Statistics}, + volume = {36}, + number = {2}, + eprint = {10.2307/2347558}, + eprinttype = {jstor}, + pages = {241}, + issn = {00359254}, + doi = {10.2307/2347558}, + url = {https://www.jstor.org/stable/10.2307/2347558?origin=crossref}, + urldate = {2025-02-19} +} + +@article{macleod_1996, + title = {Rational Approximations, Software and Test Methods for Sine and Cosine Integrals}, + author = {MacLeod, Allan J.}, + date = {1996-09}, + year = {1996}, + journal = {Numerical Algorithms}, + shortjournal = {Numer. Algor.}, + volume = {12}, + number = {2}, + pages = {259--272}, + issn = {1017-1398, 1572-9265}, + doi = {10.1007/BF02142806}, + url = {http://link.springer.com/10.1007/BF02142806}, + langid = {english} +} diff --git a/src/bessel.jl b/src/bessel.jl index a068c722..acf64729 100644 --- a/src/bessel.jl +++ b/src/bessel.jl @@ -760,7 +760,7 @@ end """ sphericalbesselj(nu, x) -Spherical bessel function of the first kind at order `nu`, ``j_ν(x)``. This is the non-singular +Spherical Bessel function of the first kind at order `nu`, ``j_ν(x)``. This is the non-singular solution to the radial part of the Helmholz equation in spherical coordinates. """ function sphericalbesselj(nu, x::T) where {T} @@ -775,7 +775,7 @@ end """ sphericalbessely(nu, x) -Spherical bessel function of the second kind at order `nu`, ``y_ν(x)``. This is +Spherical Bessel function of the second kind at order `nu`, ``y_ν(x)``. This is the singular solution to the radial part of the Helmholz equation in spherical coordinates. Sometimes known as a spherical Neumann function. """ diff --git a/src/beta_inc.jl b/src/beta_inc.jl index c6f09e03..9089e1fa 100644 --- a/src/beta_inc.jl +++ b/src/beta_inc.jl @@ -190,7 +190,7 @@ External links: See also: [`beta_inc`](@ref) # Implementation -`BFRAC(A,B,X,Y,LAMBDA,EPS)` from Didonato and Morris (1982) +`BFRAC(A,B,X,Y,LAMBDA,EPS)` from [Didonato and Morris (1992)](@cite didonato_1992) """ function beta_inc_cont_fraction(a::Float64, b::Float64, x::Float64, y::Float64, lambda::Float64, epps::Float64) @assert a > 1.0 @@ -260,7 +260,7 @@ External links: See also: [`beta_inc`](@ref) # Implementation -`BASYM(A,B,LAMBDA,EPS)` from Didonato and Morris (1982) +`BASYM(A,B,LAMBDA,EPS)` from [Didonato and Morris (1992)](@cite didonato_1992) """ function beta_inc_asymptotic_symmetric(a::Float64, b::Float64, lambda::Float64, epps::Float64) @assert a >= 15.0 @@ -443,7 +443,7 @@ External links: See also: [`beta_inc`](@ref) # Implementation -`FPSER(A,B,X,EPS)` from Didonato and Morris (1982) +`FPSER(A,B,X,EPS)` from [Didonato and Morris (1992)](@cite didonato_1992) """ function beta_inc_power_series2(a::Float64, b::Float64, x::Float64, epps::Float64) @assert b < epps*min(1.0, a) @@ -489,7 +489,7 @@ External links: See also: [`beta_inc`](@ref) # Implementation -`APSER(A,B,X,EPS)` from Didonato and Morris (1982) +`APSER(A,B,X,EPS)` from [Didonato and Morris (1992)](@cite didonato_1992) """ function beta_inc_power_series1(a::Float64, b::Float64, x::Float64, epps::Float64) @assert a <= epps*min(1.0, b) @@ -534,7 +534,7 @@ External links: See also: [`beta_inc`](@ref) # Implementation -`BPSER(A,B,X,EPS)` from Didonato and Morris (1982) +`BPSER(A,B,X,EPS)` from [Didonato and Morris (1992)](@cite didonato_1992) """ function beta_inc_power_series(a::Float64, b::Float64, x::Float64, epps::Float64) @assert b <= 1.0 || b*x <= 0.7 diff --git a/src/betanc.jl b/src/betanc.jl index 7b44f28d..f840e95c 100644 --- a/src/betanc.jl +++ b/src/betanc.jl @@ -149,8 +149,8 @@ Compute the CDF of the noncentral beta distribution given by ```math I_{x}(a,b; \lambda) = \sum_{j=0}^{\infty} q(\lambda/2,j) I_{x}(a+j,b;0) ``` -For ``\lambda < 54`` : algorithm suggested by Lenth(1987) in `ncbeta_tail(a,b,lambda,x)`. -Else for ``\lambda \geq 54``: modification in Chattamvelli(1997) in +For ``\lambda < 54``: algorithm suggested by [Lenth (1987)](@cite lenth_1987) in `ncbeta_tail(a,b,lambda,x)`. +Else for ``\lambda \geq 54``: modification in [Chattamvelli (1997)](@cite chattamvelli_1997) in `ncbeta_poisson(a,b,lambda,x)` by using both forward and backward recurrences. """ function ncbeta(a::Float64, b::Float64, lambda::Float64, x::Float64) diff --git a/src/ellip.jl b/src/ellip.jl index 7636fcd7..4bb43548 100644 --- a/src/ellip.jl +++ b/src/ellip.jl @@ -27,19 +27,10 @@ See also: [`ellipe(m)`](@ref SpecialFunctions.ellipe). ``\alpha`` by ``k = \sin \alpha``. # Implementation -Using piecewise approximation polynomial as given in -> 'Fast Computation of Complete Elliptic Integrals and Jacobian Elliptic Functions', -> Fukushima, Toshio. (2014). F09-FastEI. Celest Mech Dyn Astr, -> DOI 10.1007/s10569-009-9228-z, -> - -For ``m<0``, followed by -> Fukushima, Toshio. (2014). -> 'Precise, compact, and fast computation of complete elliptic integrals by piecewise -> minimax rational function approximation'. -> Journal of Computational and Applied Mathematics. 282. -> DOI 10.13140/2.1.1946.6245., -> +Using piecewise approximation polynomial as given in [fukushima_2009](@citet). + +For ``m < 0``, followed by [fukushima_2015](@citet). + As suggested in this paper, the domain is restricted to ``(-\infty,1]``. """ ellipk(m::Real) = _ellipk(float(m)) @@ -207,19 +198,10 @@ See also: [`ellipk(m)`](@ref SpecialFunctions.ellipk). ``\alpha`` by ``k=\sin \alpha``. # Implementation -Using piecewise approximation polynomial as given in -> 'Fast Computation of Complete Elliptic Integrals and Jacobian Elliptic Functions', -> Fukushima, Toshio. (2014). F09-FastEI. Celest Mech Dyn Astr, -> DOI 10.1007/s10569-009-9228-z, -> - -For ``m<0``, followed by -> Fukushima, Toshio. (2014). -> 'Precise, compact, and fast computation of complete elliptic integrals by piecewise -> minimax rational function approximation'. -> Journal of Computational and Applied Mathematics. 282. -> DOI 10.13140/2.1.1946.6245., -> +Using piecewise approximation polynomial as given in [fukushima_2015](@citet) + +For ``m<0``, followed by [fukushima_2015](@citet). + As suggested in this paper, the domain is restricted to ``(-\infty,1]``. """ ellipe(m::Real) = _ellipe(float(m)) diff --git a/src/erf.jl b/src/erf.jl index c878cf5d..c4b57e29 100644 --- a/src/erf.jl +++ b/src/erf.jl @@ -244,13 +244,8 @@ External links: See also: [`erf(x)`](@ref erf). # Implementation -Using the rational approximants tabulated in: -> J. M. Blair, C. A. Edwards, and J. H. Johnson, -> "Rational Chebyshev approximations for the inverse of the error function", -> Math. Comp. 30, pp. 827--830 (1976). -> , -> -combined with Newton iterations for `BigFloat`. +Using the rational approximants tabulated in [Blair (1976)](@cite blair_1976) combined with +Newton iterations for `BigFloat`. """ erfinv(x::Real) = _erfinv(float(x)) @@ -431,12 +426,7 @@ External links: See also: [`erfc(x)`](@ref erfc). # Implementation -Using the rational approximants tabulated in: -> J. M. Blair, C. A. Edwards, and J. H. Johnson, -> "Rational Chebyshev approximations for the inverse of the error function", -> Math. Comp. 30, pp. 827--830 (1976). -> , -> +Using the rational approximants tabulated in [Blair (1976)](@cite blair_1976) combined with Newton iterations for `BigFloat`. """ erfcinv(x::Real) = _erfcinv(float(x)) diff --git a/src/gamma.jl b/src/gamma.jl index 5004404d..47442289 100644 --- a/src/gamma.jl +++ b/src/gamma.jl @@ -227,7 +227,7 @@ Generalized zeta function defined by ```math \zeta(s, z) = \sum_{k=0}^\infty \frac{1}{((k+z)^2)^{s/2}}, ``` -where any term with ``k+z = 0`` is excluded. For ``\Re z > 0``, +where any term with ``k+z = 0`` is excluded. For ``\Re(z) > 0``, this definition is equivalent to the Hurwitz zeta function ``\sum_{k=0}^\infty (k+z)^{-s}``. diff --git a/src/gamma_inc.jl b/src/gamma_inc.jl index 7fbc9fb0..8d1dbd72 100644 --- a/src/gamma_inc.jl +++ b/src/gamma_inc.jl @@ -504,7 +504,8 @@ and ``P(a,x)/x^a`` is given by: (1 - J) / \Gamma(a+1) ``` resulting from term-by-term integration of `gamma_inc(a,x,ind)`. -This is used when `a < 1` and `x < 1.1` - Refer Eqn (9) in the paper. +This is used when `a < 1` and `x < 1.1` - Refer Eqn (9) in the +[paper by DiDonato & Morris (1986)](@cite didonato_1986). See also: [`gamma_inc(a,x,ind)`](@ref SpecialFunctions.gamma_inc) """ @@ -542,7 +543,7 @@ end @doc raw""" gamma_inc_minimax(a,x,z) -Compute ``P(a,x)`` using minimax approximations given by : +Compute ``P(a,x)`` using minimax approximations given by: ```math 1/2 * \operatorname{erfc}(\sqrt{y}) - e^{-y}/\sqrt{2\pi a} ⋅ T(a,\lambda) ``` where @@ -553,8 +554,8 @@ T(a,\lambda) = \sum_{0}^{N} c_{k}(z)a^{-k} This is a higher accuracy approximation of Temme expansion, which deals with the region near `a ≈ x` with `a` large. Refer Appendix F in the paper for the extensive set of coefficients calculated -using Brent's multiple precision arithmetic(set at 50 digits) in -> Brent, R. P. A Fortran multiple-precision arithmetic package, ACM Trans. Math. Softw. 4(1978), 57-70, doi: 10.1145/355769.355775. +using Brent's multiple precision arithmetic (set at 50 digits) in +[Brent (1978)](@cite brent_1978). External links: [DLMF 8.12.8](https://dlmf.nist.gov/8.12.8) @@ -700,7 +701,7 @@ end Compute using Finite Sums for ``Q(a,x)`` when `a >= 1 && 2a` is integer. Used when `a <= x <= x0` and `a = n/2`. -Refer Eqn (14) in the paper. +Refer Eqn (14) in the [paper by DiDonato and Morris (1986)](@cite didonato_1986). See also: [`gamma_inc(a,x,ind)`](@ref SpecialFunctions.gamma_inc) """ @@ -820,10 +821,8 @@ function gamma_inc_inv_alarge(a::Float64, minpq::Float64, pcase::Bool) fp = -sqrt(inv2π*a)*exp(-0.5*a*eta*eta)/gammax(a) return (x0, fp) end -# Reference : 'Computation of the incomplete gamma function ratios and their inverse' by Armido R DiDonato, Alfred H Morris. -# Published in Journal: ACM Transactions on Mathematical Software (TOMS) -# Volume 12 Issue 4, Dec. 1986 Pages 377-393 -# doi>10.1145/22721.23109 +# Reference: # DiDonato & Morris (1986), doi: 10.1145/22721.23109, +# citation key: didonato_1986 @doc raw""" gamma_inc(a,x,IND=0) @@ -841,8 +840,10 @@ In terms of these, the lower incomplete gamma function is ``\gamma(a,x) = P(a,x) \Gamma(a)`` and the upper incomplete gamma function is ``\Gamma(a,x) = Q(a,x) \Gamma(a)``. -`IND ∈ [0,1,2]` sets accuracy: `IND=0` means 14 significant digits accuracy, -`IND=1` means 6 significant digit, and `IND=2` means only 3 digit accuracy. +`IND ∈ [0,1,2]` sets accuracy: +- `IND=0` means 14 significant digits accuracy, +- `IND=1` means 6 significant digit, and +- `IND=2` means only 3 digit accuracy. External links: [DLMF 8.2.4](https://dlmf.nist.gov/8.2.4), diff --git a/src/sincosint.jl b/src/sincosint.jl index c4f00efd..41d5c667 100644 --- a/src/sincosint.jl +++ b/src/sincosint.jl @@ -245,12 +245,7 @@ External links: See also: [`cosint(x)`](@ref SpecialFunctions.cosint). # Implementation -Using the rational approximants tabulated in: -> A.J. MacLeod, -> "Rational approximations, software and test methods for sine and cosine integrals", -> Numer. Algor. 12, pp. 259--272 (1996). -> , -> . +Using the rational approximants tabulated in [MacLeod (1996)](@cite macleod_1996). Note: the second zero of ``\text{Ci}(x)`` has a typo that is fixed: ``r_1 = 3.38418 0422\mathbf{8} 51186 42639 78511 46402`` in the article, but is in fact: @@ -278,12 +273,7 @@ External links: See also: [`sinint(x)`](@ref SpecialFunctions.sinint). # Implementation -Using the rational approximants tabulated in: -> A.J. MacLeod, -> "Rational approximations, software and test methods for sine and cosine integrals", -> Numer. Algor. 12, pp. 259--272 (1996). -> , -> . +Using the rational approximants tabulated in [MacLeod (1996)](@cite macleod_1996). Note: the second zero of ``\text{Ci}(x)`` has a typo that is fixed: ``r_1 = 3.38418 0422\mathbf{8} 51186 42639 78511 46402`` in the article, but is in fact: