approximate_factorial

Function approximate_factorial 

Source
pub fn approximate_factorial(n: Integer, prec: u32) -> (Float, Integer)
Expand description

Calculates Sterling’s Approximation of large factorials. Returns a float with the digits, and an int containing the extra base 10 exponent.

§Panic

Will panic if n <= 0.

Algorithm adapted from Wikipedia as cc-by-sa-4.0