Changeset e2c597 in git


Ignore:
Timestamp:
Oct 23, 2021, 3:36:05 PM (2 years ago)
Author:
Hans Schoenemann <hannes@…>
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
Message:
Revert "ring-cf: p_Norm/p_Cleardenom*/p_Content*"
(revert only p_Content part)

This reverts commit d28095befe49d41be7cd3b72963b0f39b4bcd6cd.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.cc

    r6f184e re2c597  
    22842284{
    22852285  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   }
    22912286  const coeffs cf=r->cf;
    22922287  if (pNext(ph)==NULL)
     
    23492344  {
    23502345    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     else
    2361       c=n_Init(1,cf);
    23622346    return;
    23632347  }
     
    26382622  if(TEST_OPT_CONTENTSB) return;
    26392623  if (ph==NULL) return;
    2640   if (rField_is_Ring(r)) /*should not be called*/
    2641   {
    2642     return;
    2643   }
    26442624  if (pNext(ph)==NULL)
    26452625  {
     
    29262906  assume( r != NULL );
    29272907  assume( r->cf != NULL );
    2928   assume(!rField_is_Ring(r));
    29292908  const coeffs C = r->cf;
    29302909
     
    29442923  number d, h;
    29452924
    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)
    29472933  {
    29482934    if(!n_GreaterZero(pGetCoeff(p),C)) p = p_Neg(p,r);
     
    30673053#endif
    30683054
    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     else
    3077       c=n_Init(1,C);
    3078     return;
    3079   }
    30803055
    30813056  if( pNext(p) == NULL )
     
    31303105  }
    31313106#endif
     3107
     3108
     3109
    31323110
    31333111  if(1)
     
    38213799  {
    38223800    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.");
    38243803  }
    38253804  else if (p1!=NULL)
     
    38443823        // normalize already in nDiv: Q_a, Z/p_a
    38453824        // 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);
    38473826        p_SetCoeff(h,c,r);
    38483827        pIter(h);
Note: See TracChangeset for help on using the changeset viewer.