Fact(0) = 1, But according Fact(n) = n * Fact(n - 1);razibcse wrote:I can't understand how to calculate factorial of negative numbers...if u put n=0 in the formula (n-1)!=n!/n, u get
-1!=0!/0...how is this possible?
pls give some explanation of the process how negative even numbers get Underflow! and odd numbers get Overflow!...
Fact(0) = 1 = 0 * Fact(-1)
So Fact (-1) is equal to "unlimited large" (Sorry, my English is poor
![:oops:](./images/smilies/icon_redface.gif)
We can also now Fact(-2) is "unlimited small"
(By Fact(-1) = -1 * Fact(-2) )
I think this is the specail case for this problem.
GoOd Luck
![:wink:](./images/smilies/icon_wink.gif)