It would be nice if we could do something like:

sage: f(x,0)=e^x

sage: f(x,t)=x*t


or

sage: f(0)=0
sage: f(x)=sin(x)/x

Is there an elegant way to have multiple definitions like this in pynac, 
or definitions with specific conditions on the arguments?

This is one thing that is really nice about Mathematica: since things 
work by pattern-matching, you can define a function different ways based 
on all sorts of conditions on the inputs.  Mathematica then uses the 
most general definition it can when trying to evaluate the function.

Thanks,

Jason


-- 
Jason Grout


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