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

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


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to