You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The signs of the numerator and denominator in a polyratfun has always been somewhat arbitrary, since the variable-ordering for the computation is sorted by degree in the input. The resulting denominator is given a positive leading coefficient, and then the result is sorted back into FORM ordering. The FLINT interface currently copies this logic.
I would quite like to remove the extra sort in the flint interface, and just use FORM's lexicographic variable order in FLINT for the whole computation. Then the additional sort can be skipped, since FLINT's results are already sorted. For the mbox1l benchmark, this yields a >30% speedup.
The caveat is that the resulting polyratfun numerator and denominator might have different signs compared to the current code. However, the signs will be more consistent. In the following:
Symbol a,b;
CFunction prf;
PolyRatFun prf;
Local test1 = prf(a^1+b^1,a^1-b^1);
Local test2 = prf(a^2+b^1,a^1-b^1);
Local test3 = prf(a^1+b^2,a^1-b^1);
Print;
.end
we currently have the denominator sign varying on a term-by-term basis:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
The signs of the numerator and denominator in a polyratfun has always been somewhat arbitrary, since the variable-ordering for the computation is sorted by degree in the input. The resulting denominator is given a positive leading coefficient, and then the result is sorted back into FORM ordering. The FLINT interface currently copies this logic.
I would quite like to remove the extra sort in the flint interface, and just use FORM's lexicographic variable order in FLINT for the whole computation. Then the additional sort can be skipped, since FLINT's results are already sorted. For the
mbox1lbenchmark, this yields a >30% speedup.The caveat is that the resulting polyratfun numerator and denominator might have different signs compared to the current code. However, the signs will be more consistent. In the following:
we currently have the denominator sign varying on a term-by-term basis:
Fixing the ordering and skipping the unnecessary sort, we have
for
Symbol a,b;andfor
Symbol b,a;.Any thoughts?
All reactions