Lines Matching full:lgamma
33 // lgamma(1+s) = log(s) + lgamma(s)
35 // lgamma(7.3) = log(6.3) + lgamma(6.3)
36 // = log(6.3*5.3) + lgamma(5.3)
37 // = log(6.3*5.3*4.3*3.3*2.3) + lgamma(2.3)
38 // 2. Polynomial approximation of lgamma around its
42 // lgamma(x) = -1.214862905358496078218 + z**2*poly(z)
47 // lgamma(x) = 0.5*s + s*P(s)/Q(s)
49 // |P/Q - (lgamma(x)-0.5s)| < 2**-61.71
53 // lgamma(2+s) = s*(1-Euler) + --------- * s - --------- * s + ...
60 // lgamma(x)~(x-0.5)log(x)-x+0.5*log(2pi)+1/(12x)-1/(360x**3)+....
62 // lgamma(x)~(x-0.5)*(log(x)-1)-.5*(log(2pi)-1) + ...)
64 // f(z) = lgamma(x) - (x-0.5)(log(x)-1)
77 // lgamma(x) = log(|Gamma(x)|)
78 // = log(pi/(|x*sin(pi*x)|)) - lgamma(-x);
83 // lgamma(2+s) ~ s*(1-Euler) for tiny s
84 // lgamma(1)=lgamma(2)=0
85 // lgamma(x) ~ -log(x) for tiny x
86 // lgamma(0) = lgamma(inf) = inf
87 // lgamma(-integer) = +-inf
166 // Lgamma returns the natural logarithm and sign (-1 or +1) of Gamma(x).
169 // Lgamma(+Inf) = +Inf
170 // Lgamma(0) = +Inf
171 // Lgamma(-integer) = +Inf
172 // Lgamma(-Inf) = -Inf
173 // Lgamma(NaN) = NaN
174 func Lgamma(x float64) (lgamma float64, sign int) {
190 lgamma = x
193 lgamma = x
196 lgamma = Inf(1)
210 lgamma = -Log(x)
216 lgamma = Inf(1)
221 lgamma = Inf(1) // -integer
232 lgamma = 0
234 case x < 2: // use lgamma(x) = lgamma(x+1) - log(x)
238 lgamma = -Log(x)
251 lgamma = 0
270 lgamma += (p - 0.5*y)
278 lgamma += (Tf + p)
282 lgamma += (-0.5*y + p1/p2)
289 lgamma = 0.5*y + p/q
290 z := 1.0 // Lgamma(1+s) = Log(s) + Lgamma(s)
306 lgamma += Log(z)
313 lgamma = (x-0.5)*(t-1) + w
315 lgamma = x * (Log(x) - 1)
318 lgamma = nadj - lgamma