Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
stirling(n)  (approximationg of log(n!))

        def stirling(n):
    '''
    stirling(n)  (approximationg of log(n!))
    '''
    n = float(n)
    ans = (n + 0.5) * math.log(n) - n + 0.5*math.log(2*math.pi)
    return(ans)
        


src/t/a/TAMO-HEAD/TAMO/util/Poisson.py   TAMO(Download)
import sys
from math  import *
from Arith import fact, avestd, stirling
 
def Poisson_estimate(obs,_dist):
 
    try:
        lans = -lam + (k*log(lam)-stirling(k))
        return exp(lans)
    except: