Gammafunktionen er en generalisering af n! (eller rettere (n-1)!) til vilkårlige reelle tal. Den bliver udefineret for 0 og de negative heltal.
Figure figure = Position [0,0] Size[x,y] Origin[x/2,y/2] Unit x/18 Color "white";
Axes axes = Color "black";
Grid grid = Color "blue";
Units units = Color "black";
Function gamma( Number x ) = 1/ ( x * exp(0.5772*x) * product( n, 1, , (1+x/n)*exp(-x/n) ) );
Graph gamma_graph = gamma(x) Size 1.5 Color "red";