From ff76c3ac50d50993d838c737ff7efeb987acec71 Mon Sep 17 00:00:00 2001 From: inky Date: Mon, 8 Apr 2024 23:32:34 -0500 Subject: [PATCH] doc: add missing doc for `beta_inc_inv` (#467) * Export function only in SpecialFunctions.jl * doc: add missing doc for `beta_inc_inv` * doc: remove link in title * Update docs/src/functions_overview.md --- docs/src/functions_overview.md | 8 ++++++-- src/SpecialFunctions.jl | 16 ++++++++++++++-- src/gamma.jl | 2 -- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/src/functions_overview.md b/docs/src/functions_overview.md index 9e6b3659..d9f5bd1f 100644 --- a/docs/src/functions_overview.md +++ b/docs/src/functions_overview.md @@ -2,7 +2,10 @@ Here the *Special Functions* are listed according to the structure of [NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/). -## [Gamma Function](https://dlmf.nist.gov/5) +## Gamma Function + +- [Gamma Function - DLMF](https://dlmf.nist.gov/5) + | Function | Description | |:-------- |:----------- | | [`gamma(z)`](@ref SpecialFunctions.gamma(::Number)) | [gamma function](https://en.wikipedia.org/wiki/Gamma_function) ``\Gamma(z)`` | @@ -16,12 +19,13 @@ Here the *Special Functions* are listed according to the structure of [NIST Digi | [`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)) | -| [`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)) | | [`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``) | ## [Exponential and Trigonometric Integrals](https://dlmf.nist.gov/6) diff --git a/src/SpecialFunctions.jl b/src/SpecialFunctions.jl index 292421d8..0d296cc0 100644 --- a/src/SpecialFunctions.jl +++ b/src/SpecialFunctions.jl @@ -58,14 +58,26 @@ export logerfcx, faddeeva, eta, + + # Gamma functions + gamma, + loggamma, + logabsgamma, + logfactorial, digamma, invdigamma, - polygamma, trigamma, + polygamma, gamma_inc, + gamma_inc_inv, + # beta functions + beta, + logbeta, + logabsbeta, + logabsbinomial, beta_inc, beta_inc_inv, - gamma_inc_inv, + ncbeta, ncF, hankelh1, diff --git a/src/gamma.jl b/src/gamma.jl index a69c34de..b55992b7 100644 --- a/src/gamma.jl +++ b/src/gamma.jl @@ -2,8 +2,6 @@ using Base.MPFR: MPFRRoundingMode, ROUNDING_MODE -export gamma, loggamma, logabsgamma, beta, logbeta, logabsbeta, logfactorial, logabsbinomial - const ComplexOrReal{T} = Union{T,Complex{T}} # Bernoulli numbers B_{2k}, using tabulated numerators and denominators from