a = b*(x*y*z); /* Duplicates recognized */
c = x*y*z*d;
e = f + (x + y);
g = x + y + h;
a = b*x*y*z; /* No duplicates recognized */
c = x*y*z*d;
e = f + x + y;
g = x + y + h;
The compiler can recognize x*y*z and x + y as duplicate expressions when they are coded in parentheses or coded at the left end of the expression.
v*w*x*(c*d*e); /* Constant expressions recognized */
c + d + e + v + w + x;
v*w*x*c*d*e; /* Constant expressions not recognized */
v + w + x + c + d + e;