Rewrite Gamma as Factorial #8621

Code quality improved for pull 8700
Merge pull request #8700 from aktech/issue#8621

Function to Rewrite Gamma as Factorial #8621