David Joyner wrote: > On Sun, Mar 29, 2009 at 8:27 AM, Burcin Erocal <bur...@erocal.org> wrote: >> Hi again, >> >> This is the last in the series of symbolics related emails today. :) >> >> I'm looking for comments to trac #5607, which has this summary: >> >> >> In a comment to #5413 Jason pointed out the following confusing >> behavior: >> >> sage: g(x)=sin >> sage: g(3) >> sin(3) >> sage: g(x)=sin+x >> sage: g(3) >> sin + 3 >> >> sage: g(x)=sin+cos; g(3) >> sin + cos >> >> I think the syntax for this should be: >> >> sage: g(x) = sin(x) + 3 >> sage: g(3) >> sin(3) + 3 >> >> sage: g(x) = sin(x) + cos(x) >> sage: g(3) >> sin(3) + cos(3) > > > No objection. However, I think > > sage: t = var("t") > sage: g = function("g",t) > sage: g = sin + t > sage: g(3) > sin(3) + 3
Note that here, you are redefining g with the functon sin+t (i.e., you are replacing g as a variable; the function g(t) doesn't exist anymore). In other words, these 4 lines have exactly the same effect as: sage: t = var("t") sage: g = sin + t sage: g(3) sin(3) + 3 So the above behavior should change; that's what this thread was all about. Jason --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---