mirror of https://github.com/CGAL/cgal
replace bitwise with Boolean operators
This commit is contained in:
parent
0fb7b0d390
commit
d4c53f845d
|
|
@ -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<m;i++) {
|
||||
for(int j = i;j<m;j++) {
|
||||
bool negate = ((n-m+i+1) & 2)>>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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue