Hi, > 7 for(i=0; i<j && i+j+1<N; i++) { > > 8 for(i=0; i<j && i<N-j-1; i++) { the arithmetic might overflow in one of these but not in the other. Best wishes, Duncan.