Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
Fully qualified name: Std.Math.ApproximateFactorial
function ApproximateFactorial(n : Int) : Double
Summary
Returns an approximate factorial of a given number.
Description
Returns the factorial as Double, given an input n.
The domain of inputs for this function is n <= 169.
Remarks
For n > 10, this function uses the Ramanujan approximation with a relative error of the order of 1 / n⁵.
Input
n
The number to take the approximate factorial of. Must not be negative.
Output
The approximate factorial of n.