On Sat, 6 Nov 2021 at 11:58, Anderson Bhat <andersonbhat...@gmail.com> wrote: > > Hello guys , I am working on couple of Pr's extending the functionality of > the doit method in the concrete module , I noticed that one inconsistency > leads to couple of errors . Product(1, (n, 1, oo)).doit() returns 1 and 1**oo > returns NaN. Other integers work as expected . These expressions are > equivalent right ??? or am I missing something !
The expression 1**oo is indeterminate because there are different ways that you could arrive at this form that have different limits: In [31]: limit((1 + 1/n)**n, n, oo) Out[31]: ℯ In [32]: limit((1 + 1/n**2)**n, n, oo) Out[32]: 1 In [33]: limit((1 + 1/sqrt(n))**n, n, oo) Out[33]: ∞ The product in your case defines a particular limit so it is not indeterminate: In [38]: Product(1, (n, 1, m)).doit() Out[38]: 1 In [39]: limit(Product(1, (n, 1, m)).doit(), m, oo) Out[39]: 1 -- Oscar -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHVvXxTS%2BA32brrRS7xZ7Rr7kJ%2BLG%2BxJ6Jre1sys8_iHVzZ7tg%40mail.gmail.com.