vermaseren / form

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

replace_ fails to handle 0-replacement #367

Open pschicho opened 3 years ago

pschicho commented 3 years ago

The following program causes an error for the replacement of s1 -> 0. For s1-> (other integer) there is no issue. I remember this to work with previous versions.

auto s s;
f f I;

L [g] =
      I(f(s1+2,s2,s3))
      ;
multiply replace_(s1,0);

print+s;
.end
FORM 4.2.1 (Aug 10 2020, v4.2.1-29-g557be9d) 64-bits  Run: Fri Oct 16 14:07:16 2020
    auto s s;
    f f I;

    L [g] =
          I(f(s1+2,s2,s3))
          ;
    multiply replace_(s1,0);

    print+s;
    .end
Internal error in InFunction: Function not encountered.
Program terminating at replacetest.frm Line 9 -->
  0.00 sec out of 0.00 sec
tueda commented 3 years ago

It seems that the bug has been introduced by b2def9d; before this commit, it works.