Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.33 KB

File metadata and controls

42 lines (26 loc) · 1.33 KB




Module LogFactorial [source]

One method that returns the log of the factorial of a number.

logFactorial( k ) [source]

logFactorial. It provides the natural log of k!

if k is float, it will be truncated to int

Parameters

  • k : int or array_like of int
         the number(s) the factorial is wanted for.

Return

  • float : the ( natural ) log( k! ).

Example

print( logFactorial( 0 ) )
0
print( logFactorial( [3, 5, 10] ) )
[1.7917594692280550, 4.7874917427820458, 15.1044125730755159]

Author
Do Kester, shamelessly copied from J.Skilling