On Sep 12, 2007, at 1:06 PM, William Stein wrote: > On 9/12/07, Robert Bradshaw <[EMAIL PROTECTED]> wrote: >>> I have a few design questions that I would like to discuss and they >>> are relevant to both SymPy and SAGE, so I am posting to both >>> mailinglists. > > Thanks. I want to preface my comments below by remarking that the > design constraints in SAGE and SymPy are different so the best answers > in each case may be different. > >>> We are currently redesigning the class hierarchy in SymPy so that: >>> >>> 1) >>> >>> Add(sin, cos) >>> >>> and >>> >>> Add(sin(1),cos(1)) >>> >>> are valid constructions. Here (Add(sin, cos))(1) will produce >>> Add(sin(1), cos(1)). So that we can use both applied (sin(x)) and >>> unapplied (sin) functions. > > In SAGE the following happens. Maybe this is a design mistake in > SAGE: > > sage: f = sin + cos; f > sin + cos > sage: f(1) > sin + cos # design mistake? should it be sin(1) + cos(1)? > sage: sin(1) > sin(1) > > It definitely seems wrong from one point of view. What's happening > above is that f(1) does substitution on the variables in f, of which > there are none. In contrast sin(1) evaluates the function sin at 1. > > If somebody agrees that the above should be considered a bug > in SAGE, it should be added to trac.
See http://www.sagemath.org:9002/sage_trac/ticket/644 --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---