Hi Francois,

On Fri, 15 Oct 2010 21:46:36 +0200
Francois Maltey <fmal...@nerim.fr> wrote:

> You wrote (I cut a lot)
> > Yup, I see what you are talking about - e.g.
> >
> >             if (x.is_equal(_ex1))  // log(1) -> 0
> >                     return _ex0;
> >
> > Although it might be nice to stay relatively close to Ginac and fix
> > such things on the Sage level if that's not really bad.
> >   
> > This is a bug in the log() function, and any other function which
> > returns exact values like 0 or 1. We already work around most cases,
> > see lines 720-722 and 736-761 of sage/symbolic/function.pyx.
> >   
> I don't understand where and when these lines are used ?
> I notice there are no name about usual functions (sin, cos, log, exp)
> in this file
> So I don't understand how this filter (from int(0) to integer(0)) can
> be done.

That file defines the basic behavior of symbolic functions in Sage.

The class GinacFunction is the base class for functions provided by
GiNaC/pynac. The wrapper classes for these functions inherit from this
class, so they get the __call__() method, which is used when you call a
function. So the command ln(1) actually goes through that __call__()
method.


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

Reply via email to