Approximated logarithm of factorials

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

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)