vermaseren / form

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

non-uniquely-ordered products with extra symbols in TFORM #364

Open tueda opened 3 years ago

tueda commented 3 years ago

This is mathematically OK, but what makes the printed result of the following program unpredictable?

S x,y;
L F = x*(12+y);
B x;
.sort
Format O1;
#optimize F
#write "%O"
P;
.end

With TFORM, I get x*Z1_

TFORM 4.2.1 (Jul 28 2020, v4.2.1-25-gb2def9d) 64-bits 4 workers  Run: Wed Jul 29 14:47:54 2020

Z1_=12 + y;

      F=x*Z1_;

or sometimes Z1_*x

TFORM 4.2.1 (Jul 28 2020, v4.2.1-25-gb2def9d) 64-bits 4 workers  Run: Wed Jul 29 14:47:55 2020

Z1_=12 + y;

      F=Z1_*x;

The sequential version (or with -w1) seems to give only the former.