Re: [sage-devel] Re: GiNaC and Python disagree on arithmetic
On Mon, Sep 12, 2011 at 10:18 PM, Dima Pasechnik wrote: > I guess this all boils down to the point made by William - that _pow_ needs > to be integrated into the coersion framework (currently it is not). +1. Also, I should point out that I didn't make the decision myself back then; I was sitting next to William at the time and we had quite the lengthy discussion about it with some others in IRC. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: GiNaC and Python disagree on arithmetic
I uniformized the behavior of 0^0 a long time ago (though I make no claim about what has happened between then and now -- just that it was uniform for a few precious minutes). The decision back then (which I still stand behind) is that while it is mathematically unjustifiable, it's Python's convention so we should stick with it. On Mon, Sep 12, 2011 at 10:28 AM, kcrisman wrote: > > > On Sep 12, 12:45 pm, Keshav Kini wrote: >> Hey Burcin, >> >> I guess that means you think that pynac should return 1 for 0^0, then? As >> opposed to making Sage throw a ValueError or something at >> Integer(0)^Integer(0) ? >> > > I think that Sage has had 0^0 return 1 for quite some time now? On > the other hand, Wolfram Alpha doesn't like it, and Maxima raises an > error. I assume the BDFL has some input on this issue. > > - kcrisman > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: GiNaC and Python disagree on arithmetic
Hey Burcin, I guess that means you think that pynac should return 1 for 0^0, then? As opposed to making Sage throw a ValueError or something at Integer(0)^Integer(0) ? I'll poke around :) -Keshav -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: GiNaC and Python disagree on arithmetic
Hi Keshav, On Mon, 12 Sep 2011 03:16:27 -0700 (PDT) Keshav Kini wrote: > I believe that error message is propagated from GiNaC. See line 523 > of src/ginac/power.cpp in the pynac spkg. The error message is > hard-coded and doesn't refer to python's eval() function. This should be fixed in pynac. Since you already spent the time to identify the problem, do you want to submit a patch with the fix? https://bitbucket.org/burcin/pynac/src Cheers, Burcin -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org