Open zhaoli-IHEP opened 4 years ago
Hi,
The problem is that in the sum_ the n1 is a wildcard and hence has basically not an identity. You can take care of that with
id summation(x?,n1) = sum(n2,0,10,x*replace(n1,n2));
Now it first does the sum, gets the sum done with the values of n2 and after that inside x it will replace n1 by n2.
Cheers
Jos
On 28 May 2020, at 21:57, zhaoli-IHEP notifications@github.com wrote:
How can we make this work?
-
auto symbol x; auto symbol n; CFunction f, summation;
Local expr = summation(f(n1),n1); .sort
id summation(x?,n1) = sum_(n1,0,10,x); .sort — 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/346, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJPCEQDTLZF7RHNREMNIH3RT26Z3ANCNFSM4NNMFDPQ.
Hi, The problem is that in the sum the n1 is a wildcard and hence has basically not an identity. You can take care of that with id summation(x?,n1) = sum(n2,0,10,x*replace_(n1,n2)); Now it first does the sum, gets the sum done with the values of n2 and after that inside x it will replace n1 by n2. Cheers Jos …
Thank you so much!
How can we make this work?