Lines Matching refs:x
131 tgamma(x) in tgamma() argument
132 double x; in tgamma()
136 if (x >= 6) {
137 if(x > 171.63)
138 return (x / zero);
139 u = large_gam(x);
141 } else if (x >= 1.0 + LEFT + x0)
142 return (small_gam(x));
143 else if (x > 1.e-17)
144 return (smaller_gam(x));
145 else if (x > -1.e-17) {
146 if (x != 0.0)
148 return (one/x);
149 } else if (!finite(x))
150 return (x - x); /* x is NaN or -Inf */
152 return (neg_gam(x));
158 large_gam(x) in large_gam() argument
159 double x; in large_gam()
164 z = one/(x*x);
166 p = p/x;
168 u = __log__D(x);
170 v.a = (x -= .5);
172 v.b = x - v.a;
174 t.b = v.b*u.a + x*u.b;
187 small_gam(x) in small_gam() argument
188 double x; in small_gam()
192 y = x - one;
221 smaller_gam(x) in smaller_gam() argument
222 double x; in smaller_gam()
226 if (x < x0 + LEFT) {
227 t = x, TRUNC(t);
228 d = (t+x)*(x-t);
230 xx.a = (t + x), TRUNC(xx.a);
231 xx.b = x - xx.a; xx.b += t; xx.b += d;
232 t = (one-x0); t += x;
233 d = (one-x0); d -= t; d += x;
234 x = xx.a + xx.b;
236 xx.a = x, TRUNC(xx.a);
237 xx.b = x - xx.a;
238 t = x - x0;
239 d = (-x0 -t); d += x;
242 d = r.a/x, TRUNC(d);
244 return (d + r.a/x);
277 neg_gam(x) in neg_gam() argument
278 double x; in neg_gam()
284 y = ceil(x);
285 if (y == x) /* Negative integer. */
286 return ((x - x) / zero);
287 z = y - x;
298 if (x < -170) {
299 if (x < -190)
301 y = one - x; /* exact: 128 < |x| < 255 */
312 y = one-x;
313 if (one-y == x)
316 y = -x*tgamma(-x);