I am not sure whether this is related to math.factorial function or it is related to some typecasting or whatever. This is what I know:
>>> factorial(52)/ (factorial(52-48) - factorial(48))
-6497401L
So, with that code I am trying to calculate the number of possible combinations of a set of 52 different elements taken in groups of 48. And the result I am getting is a negative number, that makes no sense at all.
Any ideas why is this happening?
factorial(52-48)meansfactorial(4). If you subtractfactorial(48)from this you will get a negative number.factorial(52-48)is the same asfactorial(4)which is negative when you subtractfactorial(48)from it. With a positive numerator and a negative denominator, you're bound to get a negative result.