Skip to content

Instantly share code, notes, and snippets.

@benanne
Created March 12, 2012 23:30
Show Gist options
  • Select an option

  • Save benanne/2025406 to your computer and use it in GitHub Desktop.

Select an option

Save benanne/2025406 to your computer and use it in GitHub Desktop.
lngamma in theano, windschitl
import numpy as np
import theano
import theano.tensor as T
def log_gamma_windschitl(z):
return 0.5 * (T.log(2*np.pi) - T.log(z) + z * (2 * T.log(z) - 2 + T.log(z * T.sinh(1/z) + 1 / (810*(z**6)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment