0**0 follows Python conventions. The rest are likely equally useful. By the way, 0*oo does give nan as it should.
Aaron Meurer On Apr 7, 2013, at 4:59 PM, "hacm...@gmail.com" <hacm...@gmail.com> wrote: Why are the indeterminate forms oo/oo, 0/0, and oo-oo recognized as nan, but not 1**oo, 0**0, 0*oo, oo**0? On Sunday, April 7, 2013 2:38:14 PM UTC-4, Aaron Meurer wrote: > > That's because subs just works dumbly, so it produces (1 + 1/oo)**oo, > which gives 1**oo, which gives 1. A limit procedure doesn't fall into > this trap because it knows that 1**oo is an indeterminate form (for > exactly this reason). We could probably "fix" this by making 1**oo > give nan, but that would no doubt break a ton of other stuff. > > I really think that we should scrap these limit heursitics. They have > lead to dozens of wrong results like this one, where limit() is wrong, > but gruntz() is right. The whole point of limit() is that you can't > trust subs, so the fact that limit() uses subs is contradictory. And > the ironic thing is that limit() doesn't always return the result when > subs does (for example, limit() on Piecewise gives > NotImplementedError), hence workarounds like the one in > Expr._eval_interval. > > Aaron Meurer > > > On Sun, Apr 7, 2013 at 12:21 PM, Ankit Agrawal > <aaaag...@gmail.com<javascript:>> > wrote: > > > > > > > > > > On Sunday, April 7, 2013 11:25:11 PM UTC+5:30, Sergey Kirpichev wrote: > >> > >> Yes. This is a bug in the limit() heuristic. > >> > >> > >> gruntz() works well: > >> In [5]: from sympy.series import gruntz > >> In [6]: gruntz(1+(1+1/x)**x,x,oo) > >> Out[6]: 1 + ℯ > >> > > Yes. I tried to narrow down the root of the bug and it is in _sift() at > line > > 188 of series.limits in current master. > > It is actually the .subs that generates value of 1 for on (1 + 1/a)**a > > > >>>> ((1 + 1/a)**a).subs(a,oo) > > 1 > > > > -- > > 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+un...@googlegroups.com <javascript:>. > > To post to this group, send email to sy...@googlegroups.com<javascript:>. > > > Visit this group at http://groups.google.com/group/sympy?hl=en-US. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- 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 post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out. -- 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 post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.