On Tue, Nov 25, 2008 at 3:15 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>
>> One of the issues right now is that sage's piecewise is a completely
>> separate class then the rest of the calculus library. I think it

Just for the record, this is because Piecewise was implemented long
long ago by David Joyner, probably a year before any of the rest of
the calculus library was implemented.    It definitely needs to be
somehow integrated better with the
calculus code as explained here.

>> should descend from symbolic expression and be on the same level as,
>> e.g. sin and addition (and probably even have a pynac counterpart).
>> Letting the operands be the conditions (as symbolic equations, giving
>> much more flexibility then we now have) and the corresponding
>> expressions (as symbolic equations) would allow it to fit into the
>> symbolic ring nicely. This would have the advantage that one could
>> leverage all the generic SR functionality like subs, pow,
>> composition, etc. without having to re-implement it for every method
>> that's missing.
>
> Exactly. In fact, that is how Piecewise works in sympy. So I think
> pynac has to know how to properly dispatch stuff like .subs(),
> .series() and other things into the Piecewise class (after it is
> integrated into the calculus). And I know it is possible to do that
> with Cython. Btw, how about pattern matching? Will you extend the C++
> code in ginac to handle Piecewise functions?
>
> The other option is to reimplement the .subs(), .series() and pattern
> matching in Python. Burcin, please don't take my comments as sarcastic
> --- I am really interested how to handle this and how to cooperate as
> much as possible. Also, how will you approach to fix the bug in pynac
> series I reported here:
>
> http://groups.google.com/group/sage-devel/msg/a59f3c5d0586766b
>
> E.g. will you fix ginac, or rather reimplement it in Cython/Python?
> You can actually still use Maxima for that, so that's not a problem in
> fact. And later just reimplement it in Python/Cython.
>
> Ondrej
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to