Changeset a76e11 in git


Ignore:
Timestamp:
Feb 7, 2008, 9:41:00 AM (16 years ago)
Author:
Oliver Wienand <wienand@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '79dfb9a6d258bfeb991428bdb25b8f55e9e809b2')
Children:
1e36c5c49e03ef1a34a6fa933337372c1c97d6f1
Parents:
bdd99204592e417c7486a7f8d51895e883e6197e
Message:
kutilc.cc: use pp_Mult_nn instead of copy and p_Mult_nn
p_Minus...: compute length correct
pp_Mult: return null in case of null


git-svn-id: file:///usr/local/Singular/svn/trunk@10567 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/kutil.cc

    rbdd992 ra76e11  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.79 2008-02-06 10:39:41 wienand Exp $ */
     4/* $Id: kutil.cc,v 1.80 2008-02-07 08:40:59 wienand Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    26442644  if (!nIsOne(gcd))
    26452645  {
    2646     poly p = p_Copy(h->next, strat->tailRing);
     2646    poly p = h->next;
    26472647    number tmp = gcd;
    26482648    gcd = nIntDiv(0, gcd);
    26492649    nDelete(&tmp);
    2650     p = p_Mult_nn(p, gcd, strat->tailRing);
     2650    p = pp_Mult_nn(p, gcd, strat->tailRing);
    26512651    nDelete(&gcd);
    26522652
  • kernel/p_Minus_mm_Mult_qq__T.cc

    rbdd992 ra76e11  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: p_Minus_mm_Mult_qq__T.cc,v 1.7 2008-01-30 18:49:43 wienand Exp $
     9 *  Version: $Id: p_Minus_mm_Mult_qq__T.cc,v 1.8 2008-02-07 08:41:00 wienand Exp $
    1010 *******************************************************************/
    1111
     
    8888#ifdef HAVE_ZERODIVISORS
    8989  }
     90  else
     91  { // coeff itself is zero
     92    shorter += 1;
     93  }
    9094#endif
    9195  n_Delete(&tb, r);
     
    145149    }
    146150    else
     151    {
    147152      pNext(a) = r->p_Procs->pp_Mult_mm(q, m, r, last);
     153#ifdef HAVE_RINGS
     154      if (! rField_is_Domain(r))
     155      {
     156        shorter += pLength(q) - pLength(pNext(a));
     157      }
     158#endif
     159    }
    148160    pSetCoeff0(m, tm);
    149161  }
  • kernel/pp_Mult_mm__T.cc

    rbdd992 ra76e11  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: pp_Mult_mm__T.cc,v 1.5 2007-05-10 08:12:43 wienand Exp $
     9 *  Version: $Id: pp_Mult_mm__T.cc,v 1.6 2008-02-07 08:41:00 wienand Exp $
    1010 *******************************************************************/
    1111
     
    2626  }
    2727  spolyrec rp;
     28#ifdef HAVE_ZERODIVISORS
     29  rp.next = NULL;
     30#endif
    2831  poly q = &rp, r;
    2932  number ln = pGetCoeff(m);
  • kernel/pp_Mult_nn__T.cc

    rbdd992 ra76e11  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: pp_Mult_nn__T.cc,v 1.7 2008-01-31 16:13:55 wienand Exp $
     9 *  Version: $Id: pp_Mult_nn__T.cc,v 1.8 2008-02-07 08:41:00 wienand Exp $
    1010 *******************************************************************/
    1111
     
    2222  if (p == NULL) return NULL;
    2323  spolyrec rp;
     24#ifdef HAVE_ZERODIVISORS
     25  rp.next = NULL;
     26#endif
    2427  poly q = &rp;
    2528  omBin bin = r->PolyBin;
     
    3740    number nc = pGetCoeff(p);
    3841    number tmp = n_Mult(n, nc, r);
    39     if (nIsZero(tmp))
     42    if (! nIsZero(tmp))
    4043    {
    4144      p_AllocBin(pNext(q), bin, r);
Note: See TracChangeset for help on using the changeset viewer.