Skip to content
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

Closed
jodavies opened this issue Apr 30, 2020 · 1 comment
Closed

PolyRatFun and Argument #345

jodavies opened this issue Apr 30, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@jodavies
Copy link
Collaborator

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.

@tueda tueda added the bug Something isn't working label Apr 30, 2020
@vermaseren
Copy link
Owner

vermaseren commented Apr 30, 2020 via email

vermaseren added a commit that referenced this issue Jul 15, 2020
tueda added a commit that referenced this issue Jul 17, 2020
@tueda tueda closed this as completed Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants