I'm completing a project euler problem, but this function returns infinity for any value over 40.
from scipy.special import comb
def B(x):
product = 1
for i in range(x + 1):
product *= comb(x, i)
return product
what I'm getting back
problem_650.py:10: RuntimeWarning: overflow encountered in double_scalars
product *= comb(x, i)
inf
any help with fixing this would be appreciated.