-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PolyRatFun and Argument #345
Labels
bug
Something isn't working
Comments
I guess that the Argument environment never checks its sorting vs the polyratfun.
The arguments of the polyratfun are sorted differently. Clearly this must have been forgotten.
There are more workarounds like an extra
id rat(x1?,x2?) = rat(x1,x2);
which forces a normalization.
I hope that a next update gets this right. Sometimes the normalization of the polyratfun
is a pain in the neck, because you do not want to normalize it too often either. This is
particularly the case in the file proces.c which caused no end of trouble, but at least
that one has performed well over the past years.
Jos
… On 30 Apr 2020, at 11:46, jodavies ***@***.***> wrote:
Hello,
We ran into some problems with code which makes some replacements inside arguments, when those symbols appear in an active polyratfun. A minimal example is included below. In principle there are two problematic bits.
At "PROBLEM 1", in the module with the argument environment, the output is correct but not properly normalized. In principle this is OK, but in the following module ("PROBLEM 2") we move another symbol into the polyratfun and the overall numerical factor in the improperly normalized denominator is lost completely, leading to an incorrect result.
Perhaps "PROBLEM 2" is simply due to code which assumes the input is normalized properly, and the bug is only that the argument environment does not flag the polyratfun for normalization.
#-
Off Statistics;
On Highfirst;
Symbol x,s,t,u,m1,m2;
Symbol q1q2,q1q3,q2q3,q3q3;
CFunction rat;
PolyRatFun rat;
Local test = x*rat( - 4*s^2,q1q2^2*q3q3 - 2*q1q2*q1q3*q2q3);
.sort
Argument;
Identify q1q2 = s/2;
Identify q1q3 = (t-m1^2)/2;
Identify q2q3 = (-s-t+m1^2+m2^2)/2;
Identify q3q3 = m1^2;
EndArgument;
* This works fine:
*Multiply replace_(q1q2,s/2);
*Multiply replace_(q1q3,(t-m1^2)/2);
*Multiply replace_(q2q3,(-s-t+m1^2+m2^2)/2);
*Multiply replace_(q3q3,m1^2);
* PROBLEM 1
* rat is not properly normalized at the end of this module, in the case of the Argument environment
Print +s;
.sort
* PROBLEM 2
* move some other symbol into the rat
* Now the overall factor of the denominator is lost completely
Identify x^s? = rat(x^s,1);
.sort
Print +s;
.end
This can be worked around by using replace_ statements instead.
Thanks,
Josh.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#345>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABJPCEUODMTFSHUN6KFJWF3RPFCJDANCNFSM4MVLK3NA>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
We ran into some problems with code which makes some replacements inside arguments, when those symbols appear in an active polyratfun. A minimal example is included below. In principle there are two problematic bits.
At "PROBLEM 1", in the module with the argument environment, the output is correct but not properly normalized. In principle this is OK, but in the following module ("PROBLEM 2") we move another symbol into the polyratfun and the overall numerical factor in the improperly normalized denominator is lost completely, leading to an incorrect result.
Perhaps "PROBLEM 2" is simply due to code which assumes the input is normalized properly, and the bug is only that the argument environment does not flag the polyratfun for normalization.
This can be worked around by using replace_ statements instead.
Thanks,
Josh.
The text was updated successfully, but these errors were encountered: