Closed benruijl closed 7 years ago
The manual says, in "Pattern matching" chapter,
id f(mu?,mu?) = 4;
would match bothf(ka,ka)
andf(2,2)
.
and in "Variables - Indices" section,
In addition to the symbolic indices there is a number of fixed indices with a numeric value. The values of these indices runs from zero to an installation dependent number (usually 127).
In my environment, fixed indices are from 0 to 128, which match with g(mu?fixed_)
, so -1
is out of the range, though FORM should not crash.
I guess what you need in your case is something like
id g(n?int_) = ...
id g(mu?index_) = ...
to distinguish indices from numbers.
Hi Takahiro,
Till a fixed value (typically 1-127) a wildcard index can match such an integer as it can be seen as a fixed index. This runs in parallel with that you can sum an index litterally as in sum i,1,2,5,7; in which you generate 4 terms. Of course the value of those indices should be at most 127 unless you change that value in the setup. Internally the value that controls this is OffsetIndex in one of the structs.
Jos
On 24 nov. 2016, at 16:35, Takahiro Ueda notifications@github.com wrote:
The manual says, in "Pattern matching" chapter,
id f(mu?,mu?) = 4; would match both f(ka,ka) and f(2,2).
and in "Variables - Indices" section,
In addition to the symbolic indices there is a number of fixed indices with a numeric value. The values of these indices runs from zero to an installation dependent number (usually 127).
I guess what you need in your case is something like
id g(n?int) = ... id g(mu?index) = ... to distinguish indices from numbers.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vermaseren/form/issues/149#issuecomment-262802180, or mute the thread https://github.com/notifications/unsubscribe-auth/AFLxEjKaY5iSoOj2rP-YyfuQnJsmGl8Eks5rBa65gaJpZM4K7uVh.
Sadly this patch does not work for symmetric functions yet:
#-
Index mu1;
CF f(s);
L F = f(-1);
id f(mu1?) = mu1;
Print +s;
.end
I needed a copy-and-paste of the patch to another function.
The following program crashes:
with the following backtrack: