logcf

0th

Percentile

Continued Fraction Approximation of Log-Related Series

Compute a continued fraction approximation to the series (infinite sum) $$\sum_{k=0}^\infty \frac{x^k}{i +k\cdot d} = \frac{1}{i} + \frac{x}{i+d} + \frac{x^2}{i+2*d} + \frac{x^3}{i+3*d} + \ldots$$

Needed as auxiliary function in log1pmx() and lgamma1p().

Keywords
math
Usage
logcf(x, i, d, eps, maxit = 10000)
Arguments
x

numeric vector

i

positive numeric

d

non-negative numeric

eps

positive number, the convergence tolerance.

maxit

a positive integer, the maximal number of iterations or terms in the truncated series used.

Value

a numeric vector with the same attributes as x.

Note

Rescaling is done by (namespace hidden) “global” scalefactor ....

See Also

lgamma1p, log1pmx, and pbeta, whose prinicipal algorithm has evolved from TOMS 708.

Aliases
  • logcf
Examples
# NOT RUN {
l32 <- curve(logcf(x, 3,2, eps=1e-7), -3, 1)
abline(h=0,v=1, lty=3, col="gray50")
plot(y~x, l32, log="y", type = "o", main = "logcf(*, 3,2)  in log-scale")
# }
Documentation reproduced from package DPQ, version 0.3-3, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.