On Fri, 23 Jan 2009 13:46:42 -0800
Robert Bradshaw <[email protected]> wrote:

> On Jan 23, 2009, at 9:04 AM, kcrisman wrote:
<snip>
> > That's what I figured.  Are the pynac symbolics on track to be
> > directly callable (i.e. f(a,b)==0, not the .subs() stuff) relatively
> > soon?  My ulterior motive for asking that is of course for basic
> > plotting, which will hopefully be inconceivably faster with pynac...
> 
> There was a huge thread on sage-devel about this a while ago. I
> think the consensus was that
> 
> sage: f(x,y) = x^2+y^2-1
> 
> will still create a (directly callable) symbolic function, but
> 
> sage: f = x^2+y^2-1
> 
> will not, as the ordering between x and y is ambiguous. The jury was  
> still out on whether
> 
> sage: f = x^2+1
> sage: f(10)
> 
> should work, because there is a non-ambiguous interpretation. I'd  
> also like to keep the
> 
> f(x=5, y=3)
> 
> shorthand for f.subs(x=5, y=3).

This is indeed what I implemented. 

I am in the process of cleaning up my patches in order to submit
them in a couple of hours for review. Since I've substantially changed
the way symbolic expressions are printed, I keep running into small
glitches which should be fixed, and this takes much longer than I
expected. Nevertheless, you'll be able to test these changes soon.
(They definitely need testing!)

One annoying thing is that I cannot make the preparser support the new
symbolics seamlessly for the 'f(x,y) =' syntax. Since we have

sage: preparse('f(x)=x')
'_=var("x");f=symbolic_expression(x).function(x)'

where a new symbolic variable (from the maxima based symbolics) is
created before creating the callable function.

For now you'll have to use the .function(<variables>) syntax to create
these callable symbolic expressions.


Cheers,

Burcin

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to