from math import log, factorial
numerator = log(factorial(10000)) + 8000 * log(8)
denominator = log(factorial(8000)) + log(factorial(2000)) + 8000 * log(10)
How to multiply a super large number with a super small number in python?