On Sat, Jan 17, 2009 at 11:31 AM, Robert Bradshaw <rober...@math.washington.edu> wrote: > > On Jan 17, 2009, at 6:54 AM, mabshoff wrote: > >> ---------- Forwarded message ---------- >> From: Yann Laigle-Chapuy <SNIP> >> Date: Sat, Jan 17, 2009 at 4:06 AM >> Subject: [Sage Bug Report] or not? >> To: Michael Abshoff < SNIP > >> >> >> Hi, >> is the following a feature or a bug? >> >> sage: 0*log(0) >> ... >> ValueError: self must be positive >> >> ok, but >> >> sage: f=x*log(x) >> sage: f(0) >> 0 > > I would say that's a bug. Probably an overly-naive simplification. > Also, note
It's a bug, but I think there is not much of a point in even reporting it to trac, since it is already fixed in the new symbolics.... which Burcin and I wrote 5 *months* ago, and which still aren't the default in Sage. sage: var('x',ns=1) x sage: f(x) = x*log(x) sage: f(0) ... ValueError: self must be positive -- William > > sage: f = x*log(x) > sage: f(0) > 0 > sage: f.subs(x=0) > ------------------------------------------------------------ > Traceback (most recent call last): > File "<ipython console>", line 1, in <module> > File "/Users/robert/sage/current/local/lib/python2.5/site-packages/ > sage/calculus/calculus.py", line 3811, in subs > return self.substitute(*args, **kwds) > File "/Users/robert/sage/current/local/lib/python2.5/site-packages/ > sage/calculus/calculus.py", line 3808, in substitute > return X._recursive_sub(kwds) > File "/Users/robert/sage/current/local/lib/python2.5/site-packages/ > sage/calculus/calculus.py", line 4857, in _recursive_sub > new_ops = [SR(op._recursive_sub(kwds)) for op in ops] > File "/Users/robert/sage/current/local/lib/python2.5/site-packages/ > sage/calculus/calculus.py", line 6275, in _recursive_sub > return ops[0](ops[1]._recursive_sub(kwds)) > File "/Users/robert/sage/current/local/lib/python2.5/site-packages/ > sage/calculus/calculus.py", line 6600, in __call__ > return getattr(x, self._repr_())(*args) > File "integer.pyx", line 1560, in sage.rings.integer.Integer.log > (sage/rings/integer.c:11178) > ValueError: self must be positive > > sage: f(x) = x*log(x) > sage: f(0) > ------------------------------------------------------------ > Traceback (most recent call last): > File "<ipython console>", line 1, in <module> > File "/Users/robert/sage/current/local/lib/python2.5/site-packages/ > sage/calculus/calculus.py", line 5922, in __call__ > return self._expr.substitute(dct) > File "/Users/robert/sage/current/local/lib/python2.5/site-packages/ > sage/calculus/calculus.py", line 3808, in substitute > return X._recursive_sub(kwds) > File "/Users/robert/sage/current/local/lib/python2.5/site-packages/ > sage/calculus/calculus.py", line 4857, in _recursive_sub > new_ops = [SR(op._recursive_sub(kwds)) for op in ops] > File "/Users/robert/sage/current/local/lib/python2.5/site-packages/ > sage/calculus/calculus.py", line 6275, in _recursive_sub > return ops[0](ops[1]._recursive_sub(kwds)) > File "/Users/robert/sage/current/local/lib/python2.5/site-packages/ > sage/calculus/calculus.py", line 6600, in __call__ > return getattr(x, self._repr_())(*args) > File "integer.pyx", line 1560, in sage.rings.integer.Integer.log > (sage/rings/integer.c:11178) > ValueError: self must be positive > > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---