gamma

The Gamma function, $(GAMMA)(x)

$(GAMMA)(x) is a generalisation of the factorial function to real and complex numbers. Like x!, $(GAMMA)(x+1) = x * $(GAMMA)(x).

Mathematically, if z.re > 0 then $(GAMMA)(z) = $(INTEGRATE 0, $(INFIN)) tz-1e-t dt

Special Values
x$(GAMMA)(x)
NaNNaN
±0.0$(PLUSMNINF)
integer > 0(x-1)!
integer < 0NaN
+∞+∞
-∞NaN
pure nothrow @safe @nogc
real
gamma
(
real x
)

Meta