logbinomial¶
- mpsci.fun.logbinomial(n, k)¶
Natural logarithm of binomial(n, k).
Examples
>>> from mpmath import mp >>> mp.dps = 25 >>> from mpsci.fun import logbinomial
Compute the log of C(1500, 450).
>>> logbinomial(1500, 450) mpf('912.5010192350457701746286796')
Verify that it is the expected value.
>>> mp.log(mp.binomial(1500, 450)) mpf('912.5010192350457701746286773')