| 69 | |
| 70 | #ifdef HAVE_RATGRING |
| 71 | BOOLEAN pCompareChainPart (poly p,poly p1,poly p2,poly lcm, const ring R) |
| 72 | { |
| 73 | int k, j; |
| 74 | |
| 75 | if (lcm==NULL) return FALSE; |
| 76 | |
| 77 | for (j=R->real_var_end; j>=R->real_var_start; j--) |
| 78 | if ( p_GetExp(p,j, R) > p_GetExp(lcm,j, R)) return FALSE; |
| 79 | if ( pGetComp(p) != pGetComp(lcm)) return FALSE; |
| 80 | for (j=R->real_var_end; j>=R->real_var_start; j--) |
| 81 | { |
| 82 | if (p_GetExp(p1,j, R)!=p_GetExp(lcm,j, R)) |
| 83 | { |
| 84 | if (p_GetExp(p,j, R)!=p_GetExp(lcm,j, R)) |
| 85 | { |
| 86 | for (k=(R->N); k>j; k--) |
| 87 | for (k=R->real_var_end; k>j; k--) |
| 88 | { |
| 89 | if ((p_GetExp(p,k, R)!=p_GetExp(lcm,k, R)) |
| 90 | && (p_GetExp(p2,k, R)!=p_GetExp(lcm,k, R))) |
| 91 | return TRUE; |
| 92 | } |
| 93 | for (k=j-1; k>=R->real_var_start; k--) |
| 94 | { |
| 95 | if ((p_GetExp(p,k, R)!=p_GetExp(lcm,k, R)) |
| 96 | && (p_GetExp(p2,k, R)!=p_GetExp(lcm,k, R))) |
| 97 | return TRUE; |
| 98 | } |
| 99 | return FALSE; |
| 100 | } |
| 101 | } |
| 102 | else if (p_GetExp(p2,j, R)!=p_GetExp(lcm,j, R)) |
| 103 | { |
| 104 | if (p_GetExp(p,j, R)!=p_GetExp(lcm,j, R)) |
| 105 | { |
| 106 | for (k=R->real_var_end; k>j; k--) |
| 107 | { |
| 108 | if ((p_GetExp(p,k, R)!=p_GetExp(lcm,k, R)) |
| 109 | && (p_GetExp(p1,k, R)!=p_GetExp(lcm,k, R))) |
| 110 | return TRUE; |
| 111 | } |
| 112 | for (k=j-1; k>=R->real_var_start; k--) |
| 113 | { |
| 114 | if ((p_GetExp(p,k, R)!=p_GetExp(lcm,k, R)) |
| 115 | && (p_GetExp(p1,k, R)!=p_GetExp(lcm,k, R))) |
| 116 | return TRUE; |
| 117 | } |
| 118 | return FALSE; |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | return FALSE; |
| 123 | } |
| 124 | #endif |
| 125 |
no test coverage detected