stirling: Stirling's approximation for factorials

Description Usage Arguments Details Author(s) See Also Examples

View source: R/stirling.R

Description

Uses Stirling's Approximation to approximate x!

Usage

1

Arguments

x

A number or vector of numbers

Details

sqrt(2 * pi * x) * (x / exp(1)) ^ x

Author(s)

Gene Leynes

See Also

factorial Factorials calculated exactly.

Examples

1
2
3
4
5
6
7
		require(geneorama)

		factorial(10)
		stirling(10)
		
		plot(factorial(1:15), type = "o", log = "y")
		lines(stirling(1:15), type = "o", col="red")

geneorama/geneorama documentation built on Oct. 17, 2020, 12:35 a.m.