                /**  Gamma function  **/
 
/*K: Euler Gamma function; Euler integral of first kind; factorials */
 
/*A: S.Wolfram */
/*S: California Institute of Technology */
/*D: February 1982 */
 
/* Definitions for special values */
/*U: John Gottschalk, Univesity of Western Australia, July 1985 */

/* Contains rules for automatically reducing gamma functions of 
    integer and 1/2-integer arguments. Gamma[negative integer] 
    is rewritten in terms of Gamma[0]. Functions with
    arguments greater or less then zero are written in terms
    of functions with an argument in the range 0 to 1. */

Loadonce[XMSet]

Gamma[$x_=$x>1&Numbp[$x]] :::Ap[Gamma[$x-$n] Prod[$x+%#i,{%#i,-$n,-1}],{ Floor[$x]}]
Gamma[$x_=$x<0&Numbp[$x]] :::Ap[Gamma[$x+$n]/Prod[$x+%#i,{%#i,0,$n-1}],{-Floor[$x]}]
Gamma[1]                              :  1
Gamma[$n_=Natp[$n]     & Numbp[$n]]  ::: ($n-1)!
Gamma[1/2]                            :  Sqrt[Pi]
Gamma[$n_=Natp[$n-1/2] & Numbp[$n]]  ::: Pi^(1/2) 2^(1/2-$n) (2$n-2)!!
Gamma[-1/2]                           :  -2 Sqrt[Pi]
Gamma[$n_=Natp[1/2-$n] & Numbp[$n]]  ::: (-2)^(1/2-$n) Sqrt[Pi]/(-2$n)!!

SGammaV : {$a/Gamma[0]    -> 0, $a/($$b Gamma[0])    -> 0,\
	   $a/Gamma[0]^($n_=$n>0) -> 0, $a/($b Gamma[0]^($n_=$n>0)) -> 0}

_XGammaV[Loaded] : 1


