diff --git a/Polynomial/include/CGAL/Polynomial/bezout_matrix.h b/Polynomial/include/CGAL/Polynomial/bezout_matrix.h index 4a2f57ff6cf..de2ea41e75d 100644 --- a/Polynomial/include/CGAL/Polynomial/bezout_matrix.h +++ b/Polynomial/include/CGAL/Polynomial/bezout_matrix.h @@ -596,8 +596,8 @@ polynomial_subresultant_matrix(typename Polynomial_traits_d::Polynomial_d f, // Divide through the divisor and set the correct sign for(int i=0;i>1; // (n-m+i+1)==2 or 3 mod 4 - negate=negate ^ (swapped & ((n-m+i+1)*(i+1))); + bool negate = (((n-m+i+1) & 2)>>1) != 0; // (n-m+i+1)==2 or 3 mod 4 + negate = negate != (swapped && (((n-m+i+1)*(i+1)) != 0)); //...XOR (swapped AND (n-m+i+1)* (i+1) is odd) Ret[i][j] = idiv(Ret[i][j], negate ? -divisor : divisor); }