Source: http://iask.sina.com.cn/ B /1882074.html
1) 0! = 1, 0! = 1! (Reference: http://baike.baidu.com/view/245476.htm#5)
2) negative number without factorial (reference: http://zhidao.baidu.com/question/11523163.html)
3) decimals do not have factorial (in general) (reference: http://baike.baidu.com/view/245476.htm#5)
Customizable: X! = Gamma (X + 1)
3.5! = Gamma (4.5)
= 3.5 Gamma (3.5)
= 3.5*2.5 Gamma (2.5)
= 3.5x2.5*1.5 Gamma (1.5)
= 3.5*2.5*1.5*0.5 * Gamma (0.5)
= 3.5*2.5*1.5*0.5 √ π -------> "√ π "Refers π Root
= (105/16) * √ π -------> Use the score to represent the previous calculation (calculate the root number in the calculator: Select "View-> science", enter the number of the root number, and click "inv" on the left ", click x ^ 2 again)
= 11.631728396567448929144224109426 (the result is calculated from the system calculator)
Decimal factorialBrief Introduction:(Reference: http://zhidao.baidu.com/question/24646307.html)
The factorial of decimal places is a generalized factorial, which is related to the Gamma function,
Condition |
Formula |
A> 1 |
A! = A * (A-1 )! |
A <1 and a> 0 |
A! =Gamma(A + 1) =Gamma() |
WhileGamma(A) points included in variableGamma(A) = Limit 0 → + ∞ x ^ (A-1) * exp (-x) dx given.
WhileGamma(0.5) exactly equalπThe square rootGamma(1, 0.5) = sqr (π),
So there are 0.5! = 0.5 *Gamma(1, 0.5) = sqr (π)/2
There are two ways to directly obtain:
1. You can use a calculator or a computer to calculate 3.5! = 11.631728396567448929144224109426
2. Use formula X! = Gamma (x + 1)
C language implementationCode: Http://www.cnblogs.com/hcbin/archive/2010/04/26/1721099.html