SpecialFunctions.jl icon indicating copy to clipboard operation
SpecialFunctions.jl copied to clipboard

logmultinomial implements log(Combinatorics.multinomial)

Open btwied opened this issue 5 years ago • 2 comments

It's likely I haven't met proper guidelines for style/documentation, so please verify those when reviewing the pull request.

btwied avatar May 30 '20 03:05 btwied

Is there any other library (numpy, mathematica, etcetera) that implements this function?

stevengj avatar May 30 '20 13:05 stevengj

Is there any other library (numpy, mathematica, etcetera) that implements this function?

As far as I know, no. Numpy definitely doesn't have it, but numpy doesn't even have multinomial, which I was very glad to find Julia's Combinatorics does have. Multinomials are useful for various discrete probability calculations, and when those calculations are done under a log transform, logmultinomial would be handy. I implemented it because I needed it for game-theory research code where I'm computing expected utilities in large symmetric games, and I think there's a good chance it could be useful to others.

btwied avatar May 30 '20 14:05 btwied