facL: Approximated logarithm of factorials

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/utilities.R

Description

Stirling's 2nd order approximation of the logarithm of a factorial.

Usage

1
facL(n)

Arguments

n

vector of integers for which to compute the logarithmic factorial.

Value

The logarithm of the factorial.

Author(s)

Kristian Hovde Liland

References

Liland, KH & Snipen, L, FixedTimeEvents: An R package for the distribution of distances between discrete events in fixed time, SoftwareX 5 (2016).

See Also

dLiland, Liland, Liland.test, simLiland

Examples

1
2
3
4
5
6
7
# Some values of the logarithm of factorials.
facL( c(2,10,100,1000) )
log( factorial( c(2,10,100,1000) ) )

# Fraction of two factorials
exp( facL(200)-facL(180) )
factorial(200)/factorial(180)

fixedTimeEvents documentation built on Jan. 4, 2022, 5:09 p.m.