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

Problems with a very simple input file #272

Closed HaraldHofstaetter closed 6 years ago

HaraldHofstaetter commented 6 years ago
Symbol x;
Local y = x-1/4;
Print;
Format O1;
.end

wrongly gives

FORM 4.2.0 (Jul  6 2017, v4.2.0) 64-bits         Run: Tue Mar 13 18:51:07 2018

      Z1_=1 - 1/4;
      y=x*Z1_;

This wrong result occurs for Format O1, O2, O3 but not for O0. Also everything is alright if 1/4 is replaced by 1/2.

benruijl commented 6 years ago

I only had time to look at the issue today, but the good news is that the bug is fixed!

The program wasn't only giving the wrong result due to a bad construction of the Horner tree, it was also crashing due to another issue. Both are fixed.