Changeset e2c597 in git
- Timestamp:
- Oct 23, 2021, 3:36:05 PM (2 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- b4b74c58962d8ea2198ff792eed53fc85d857e74
- Parents:
- 6f184ed5718756bb0410a3aebe5f372b76edd55f
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-10-23 15:36:05+02:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-10-23 15:48:28+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/monomials/p_polys.cc
r6f184e re2c597 2284 2284 { 2285 2285 if (ph==NULL) return; 2286 if (rField_is_Ring(r)) /*should not be called*/2287 {2288 if(!n_GreaterZero(pGetCoeff(ph),r->cf)) ph = p_Neg(ph,r);2289 return;2290 }2291 2286 const coeffs cf=r->cf; 2292 2287 if (pNext(ph)==NULL) … … 2349 2344 { 2350 2345 c=n_Init(1,cf); 2351 return;2352 }2353 if (rField_is_Ring(r)) /*should not be called*/2354 {2355 if(!n_GreaterZero(pGetCoeff(ph),cf))2356 {2357 ph = p_Neg(ph,r);2358 c=n_Init(-1,cf);2359 }2360 else2361 c=n_Init(1,cf);2362 2346 return; 2363 2347 } … … 2638 2622 if(TEST_OPT_CONTENTSB) return; 2639 2623 if (ph==NULL) return; 2640 if (rField_is_Ring(r)) /*should not be called*/2641 {2642 return;2643 }2644 2624 if (pNext(ph)==NULL) 2645 2625 { … … 2926 2906 assume( r != NULL ); 2927 2907 assume( r->cf != NULL ); 2928 assume(!rField_is_Ring(r));2929 2908 const coeffs C = r->cf; 2930 2909 … … 2944 2923 number d, h; 2945 2924 2946 if (rField_is_Ring(r)) /*should not be called*/ 2925 if (rField_is_Ring(r)) 2926 { 2927 p_ContentForGB(p,r); 2928 if(!n_GreaterZero(pGetCoeff(p),C)) p = p_Neg(p,r); 2929 return p; 2930 } 2931 2932 if (rField_is_Zp(r) && TEST_OPT_INTSTRATEGY) 2947 2933 { 2948 2934 if(!n_GreaterZero(pGetCoeff(p),C)) p = p_Neg(p,r); … … 3067 3053 #endif 3068 3054 3069 if (rField_is_Ring(r)) /*should not be called*/3070 {3071 if(!n_GreaterZero(pGetCoeff(ph),C))3072 {3073 ph = p_Neg(ph,r);3074 c=n_Init(-1,C);3075 }3076 else3077 c=n_Init(1,C);3078 return;3079 }3080 3055 3081 3056 if( pNext(p) == NULL ) … … 3130 3105 } 3131 3106 #endif 3107 3108 3109 3132 3110 3133 3111 if(1) … … 3821 3799 { 3822 3800 if(!n_GreaterZero(pGetCoeff(p1),r->cf)) p1 = p_Neg(p1,r); 3823 //p_ContentForGB(p1,r); 3801 if (!n_IsUnit(pGetCoeff(p1), r->cf)) return; 3802 // Werror("p_Norm not possible in the case of coefficient rings."); 3824 3803 } 3825 3804 else if (p1!=NULL) … … 3844 3823 // normalize already in nDiv: Q_a, Z/p_a 3845 3824 // remains: Q 3846 if (rField_is_Q(r) ) n_Normalize(c,r->cf);3825 if (rField_is_Q(r) && (!n_IsOne(c,r->cf))) n_Normalize(c,r->cf); 3847 3826 p_SetCoeff(h,c,r); 3848 3827 pIter(h);
Note: See TracChangeset
for help on using the changeset viewer.