# gamma(a,x) is incomplete big Gamma(a,x) from x to oo;
# gamma(n,0,x) is small gamma(n,x) from 0 to x;
# gamma(n,a,x) is small gamma(n,x) from a to x;
# gamma(1/2,x_) := -sqrt(pi)*erf(sqrt(x));
# gamma(1/2,-x_) := -sqrt(pi)*i*erfi(sqrt(x));
# gamma(0,0) := inf;
# gamma(0,x_) = -Ei(-x)=En(1,x);
#Gamma(s_,a_,b_):=gamma(s,a)-gamma(s,b);
#gamma(s_,a_,b_):=gamma(s,a)-gamma(s,b);


gamma(s_,a_,a_) :=0;
gamma(s_,0,b_):=gamma(s)-gamma(s,b);
gamma(s_,a_,inf) := gamma(s,a);

gamma(a_,0):= gamma(a);
gamma(a_,inf):= 0;
gamma(0,x_) := -Ei(-x);
gamma(1,x_):= exp(-x);

#gamma(1+x_):=x!;
gamma(-0.5):= -2*sqrt(pi);
gamma(0.5):= sqrt(pi);
gamma(3/2):= sqrt(pi)/2;
gamma(5/2):= 3/4*sqrt(pi);
gamma(zero):= infinity;
gamma(-zero):= -infinity;