vermaseren / form

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

Clarify that Polyratfun numerator expansion is relative #348

Open benruijl opened 4 years ago

benruijl commented 4 years ago

When all terms in the numerator depend on the expansion variable and have power > 1, polyratfun(expand,....) does not truncate the numerator.

S eps;
CF rat;
Polyratfun rat(expand,eps,3);

L F = rat(eps^4,1);
Print +s;
.end

Gives rat(eps^4,1) instead of rat(1,1).

Similary, it will not expand rat(eps^4 + eps^5,1); and rat(eps^2 + eps^5,1); It will expand rat(eps + eps^5,1); and rat(1 + eps^5,1);.

This is in contradiction with the manual, where it says: "eventually all terms with powers of x that are greater than ’power’ will be discarded".

vermaseren commented 4 years ago

Don’t forget that the expansion is relative to the leading term. You can try rat(ep^4+ep^5+ep^6+ep^7+ep^8,1) and see what happens.

Jos

On 8 Jun 2020, at 14:41, Ben Ruijl notifications@github.com wrote:

When all terms in the numerator depend on the expansion variable and have power > 1, polyratfun(expand,....) does not truncate the numerator.

S eps; CF rat; Polyratfun rat(expand,eps,3);

L F = rat(eps^4,1); Print +s; .end Gives rat(eps^4,1) instead of rat(1,1).

Similary, it will not expand rat(eps^4 + eps^5,1); and rat(eps^2 + eps^5,1); It will expand rat(eps + eps^5,1); and rat(1 + eps^5,1);.

This is in contradiction with the manual, where it says: "eventually all terms with powers of x that are greater than ’power’ will be discarded".

— 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/348, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJPCEQ6KIYPYWVZKKYADHDRVTMA5ANCNFSM4NYL3XWQ.

benruijl commented 4 years ago

I figured something like this is happening, but then we should write that in the manual more clearly.

I interpret "eventually all terms with powers of x that are greater than ’power’ will be discarded" as a statement about the absolute power of x.