diff --git a/R/lnpochhammer.R b/R/lnpochhammer.R index bf3524c89b21b974df40b0db75924efd081f0737..19d6c286dc4dbb89aa891e60535cf5c3c889fe4b 100644 --- a/R/lnpochhammer.R +++ b/R/lnpochhammer.R @@ -11,8 +11,10 @@ lnpochhammer <- function(x, n) { #' @return Numeric value. The logarithm of the Pochhammer symbol. #' @details The Pochhammer symbol is given by: #' \deqn{ \displaystyle{ (x)_n = \frac{\Gamma(x+n)}{\Gamma(x)} = x (x+1) ... (x+n-1) } } - #' So: + #' So, if \eqn{n > 0}: #' \deqn{ \displaystyle{ log\left((x)_n\right) = log(x) + log(x+1) + ... + log(x+n-1) } } + #' + #' If \eqn{n = 0}, \eqn{\displaystyle{ log\left((x)_n\right) = log(1) = 0}} #' @seealso [pochhammer()] #' @author Pierre Santagostini, Nizar Bouhlel #' diff --git a/man/lnpochhammer.Rd b/man/lnpochhammer.Rd index ee6fed260fa5b22ed7c2f0721f2599b3cc15c4a3..29e15d47bfec69607a5bd8702991f148709559ec 100644 --- a/man/lnpochhammer.Rd +++ b/man/lnpochhammer.Rd @@ -20,8 +20,10 @@ Computes the logarithm of the Pochhammer symbol. \details{ The Pochhammer symbol is given by: \deqn{ \displaystyle{ (x)_n = \frac{\Gamma(x+n)}{\Gamma(x)} = x (x+1) ... (x+n-1) } } -So: +So, if \eqn{n > 0}: \deqn{ \displaystyle{ log\left((x)_n\right) = log(x) + log(x+1) + ... + log(x+n-1) } } + +If \eqn{n = 0}, \eqn{\displaystyle{ log\left((x)_n\right) = log(1) = 0}} } \examples{ lnpochhammer(2, 0)