Dear Vladimir, On Fri, 2006-03-10 at 10:33 +0000, Vladimir Kisil wrote:
CD> maybe the best thing to do would be to have step(0)=1/2 and not to do a CD> simplification step(x)^2 -> step(x). CD> Can everybody live with that?
Since it is consistent no reasons to object.
OK.
CD> After all, if desired, such a CD> simplification could also be done by the user. (S)he could do CD> .subs(step(wild())*step(wild())==step(wild()), subs_options::algebraic).
In heavy calculations it is important that some simplifications are made automatically on intermediate cases. To this end we may have (in the core GiNaC or user-defined) another function (say "jump") which have the property jump^2(t) -> jump(t).
I would prefer not to have such a function in GiNaC itself. The difference between "jump" and "step" would be too small to justify introducing another object IMO. I did not follow the discussion on the new function system that Jens seems to be building, but what would be ideal is if the user could implement "jump" by deriving from "step" and simply add the automatic simplification jump^2 -> jump. I would think that the number of users that needs this simplification to be done in the midst of a calculation is not so large as to justify adding the function "jump" to the library. Best, Chris