File: logmdigamma.Rd

package info (click to toggle)
r-cran-statmod 1.4.20-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 332 kB
  • ctags: 13
  • sloc: fortran: 75; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
\name{logmdigamma}
\alias{logmdigamma}
\title{Log Minus Digamma Function}
\description{
The difference between the \code{log} and \code{digamma} functions.
}
\usage{
logmdigamma(x)
}
\arguments{
  \item{x}{numeric vector or array of positive values. Negative or zero values will return \code{NA}.}
}
\details{
\code{digamma(x)} is asymptotically equivalent to \code{log(x)}.  \code{logmdigamma(x)} computes \code{log(x) - digamma(x)} without subtractive cancellation for large \code{x}.
}
\author{Gordon Smyth}
\references{
Abramowitz, M., and Stegun, I. A. (1970). \emph{Handbook of
mathematical functions.} Dover, New York.
}
\seealso{
\code{\link{digamma}}
}
\examples{
log(10^15) - digamma(10^15) # returns 0
logmdigamma(10^15) # returns value correct to 15 figures
}
\keyword{math}