I'm trying to evaluate a long expression with lots of summations and n choose k's. For some reason, the following expression (which is a part of the long expression) returns NaN.
from sympy import *However, if I evaluate each of the terms in the first sum separately, I get 0 for each of them (as should be):
exprr2 = binomial(5, w_1_2_3)*Sum(binomial(0, -w_1_2_3 + w_1_3)*binomial(2, w_1_2_3 - w_1_3 - 2)*binomial(13, 11 - w_1_2_3), (w_1_3, w_1_2_3, 5))What is going on here? Why do I get NaN for the overall term?
I also posted a question in StackOveflow-https://stackoverflow.com/questions/73222278/sympy-doit-returns-nan-instead-of-zero