> I believe that in this case something like XVECEXP(x,i,1) is needed in the > SUBST() instead of the XEXP(x,i). But I have no idea what to check for a No. The objective of this piece of code is to process XEXP(x, i) . The problem is that an incorrect value for new has been calculated. Find out why.