vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
1.16k stars 138 forks source link

SplitArg ((symbol)) func; when symbol has a power limit of zero #332

Open jodavies opened 4 years ago

jodavies commented 4 years ago

Hello,

The following code produces an incorrectly split argument.

Symbol ep(:0),s,t;
CFunction f;

Local test = f(s+t);

SplitArg ((ep)) f;

Print +s;
.end
test = + f(t,s);

This breaks a procedure which automatically determines a power limit based on what appears in the expression.

I suppose this is a consequence of ((ep)) going though normalization (the output is the same as SplitArg ((0))). I have coded around it, but thought I should mention it here.

Thanks, Josh.

vermaseren commented 4 years ago

The problem here is that the part ((ep)) is something that gets worked out because you could have put here also $ expressions. Hence it becomes ((0)), and this will always match. It would be a matter of very specific special cases to be inserted in rather complicated code to try to avoid it, and then maybe somebody else may complain that they would have it the old way. It is more an extremely tricky point rather than a bug.