Changeset 93ebe1 in git


Ignore:
Timestamp:
Jun 25, 2008, 1:27:31 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '3720ae8bfcff4a4649ee98a15552089151d2d59b')
Children:
c0f7e2988b957111af5de1cc61d5db94117bbd43
Parents:
50be61b82bf6629f723c7dfbd65a3a1d7e764ca6
Message:
*hannes: rings


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

Legend:

Unmodified
Added
Removed
  • kernel/kspoly.cc

    r50be61 r93ebe1  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kspoly.cc,v 1.14 2008-02-23 20:13:30 levandov Exp $ */
     4/* $Id: kspoly.cc,v 1.15 2008-06-25 11:27:31 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Routines for Spoly creation and reductions
     
    228228    a2 = tailRing->p_Procs->pp_Mult_mm(a2, m2, tailRing,last);
    229229#ifdef HAVE_RINGS
    230   if (rField_is_Ring(currRing) && !(rField_is_Domain(currRing))) l2 = pLength(a2);
     230  if (!(rField_is_Domain(currRing))) l2 = pLength(a2);
    231231#endif
    232232
     
    365365
    366366#ifdef HAVE_RINGS
     367  BOOLEAN is_Ring=rField_is_Ring(currRing);
    367368  number lc1 = pGetCoeff(p1), lc2 = pGetCoeff(p2);
    368   if (rField_is_Ring(currRing))
     369  if (is_Ring)
    369370  {
    370371    ksCheckCoeff(&lc1, &lc2); // gcd and zero divisors
     
    414415      p_Setm(m2, currRing);
    415416#ifdef HAVE_RINGS
    416       if (rField_is_Ring(currRing))
     417      if (is_Ring)
    417418      {
    418419          nDelete(&lc1);
     
    429430    {
    430431#ifdef HAVE_RINGS
    431     if (rField_is_Ring(currRing))
     432    if (is_Ring)
    432433    {
    433434      nDelete(&lc1);
     
    466467    p_Setm(m1, currRing);
    467468#ifdef HAVE_RINGS
    468     if (rField_is_Ring(currRing))
     469    if (is_Ring)
    469470    {
    470471      pSetCoeff0(m1, t2);
     
    523524        p_LmFree(m2,currRing);
    524525#ifdef HAVE_RINGS
    525         if (rField_is_Ring(currRing))
     526        if (is_Ring)
    526527        {
    527528          pSetCoeff0(m1, t2);
     
    539540        p_LmFree(m1,currRing);
    540541#ifdef HAVE_RINGS
    541         if (rField_is_Ring(currRing))
     542        if (is_Ring)
    542543        {
    543544          pSetCoeff0(m2, t1);
     
    553554    }
    554555#ifdef HAVE_RINGS
    555     if (rField_is_Ring(currRing))
     556    if (is_Ring)
    556557    {
    557558      equal = nEqual(t1,t2);
     
    570571      p_LmFree(m2,currRing);
    571572#ifdef HAVE_RINGS
    572       if (rField_is_Ring(currRing))
     573      if (is_Ring)
    573574      {
    574575          pSetCoeff0(m1, nSub(t1, t2));
     
    586587    pIter(a2);
    587588#ifdef HAVE_RINGS
    588     if (rField_is_Ring(currRing))
     589    if (is_Ring)
    589590    {
    590591      if (a2 != NULL)
     
    598599        t2 = nMult(pGetCoeff(a1),lc2);
    599600      }
    600       while (a1 != NULL && nIsZero(t2))
     601      while ((a1 != NULL) && nIsZero(t2))
    601602      {
    602603        pIter(a1);
     
    607608        }
    608609      }
    609       while (a2 != NULL && nIsZero(t1))
     610      while ((a2 != NULL) && nIsZero(t1))
    610611      {
    611612        pIter(a2);
     
    624625      {
    625626#ifdef HAVE_RINGS
    626         if (rField_is_Ring(currRing))
     627        if (is_Ring)
    627628        {
    628629          nDelete(&lc1);
  • kernel/numbers.cc

    r50be61 r93ebe1  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: numbers.cc,v 1.15 2008-06-25 10:00:23 Singular Exp $ */
     4/* $Id: numbers.cc,v 1.16 2008-06-25 11:27:31 Singular Exp $ */
    55
    66/*
     
    114114
    115115#ifdef HAVE_RINGS
    116 BOOLEAN ndDivBy(number a, number b) { return TRUE; }
     116BOOLEAN ndDivBy(number a, number b) { return TRUE; } // assume a,b !=0
    117117int ndComp(number a, number b) { return 0; }
    118 BOOLEAN ndIsUnit(number a) { return TRUE; }
     118BOOLEAN ndIsUnit(number a) { return !nIsZero(a); }
    119119number  ndExtGcd (number a, number b, number *s, number *t) { return nInit(1); }
    120120#endif
  • kernel/pInline1.h

    r50be61 r93ebe1  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: pInline1.h,v 1.14 2008-01-30 09:01:37 wienand Exp $
     9 *  Version: $Id: pInline1.h,v 1.15 2008-06-25 11:27:31 Singular Exp $
    1010 *******************************************************************/
    1111#ifndef PINLINE1_H
     
    389389#ifdef HAVE_RINGS
    390390  pDivAssume(p_DebugLmDivisibleByNoComp(a, b, r) == nDivBy(p_GetCoeff(b, r), p_GetCoeff(a, r)));
    391   return nDivBy(p_GetCoeff(b, r), p_GetCoeff(a, r));
     391  return (!rField_is_Ring(r)) || nDivBy(p_GetCoeff(b, r), p_GetCoeff(a, r));
    392392#else
    393393  pDivAssume(p_DebugLmDivisibleByNoComp(a, b, r) == TRUE);
  • kernel/p_Mult_q.cc

    r50be61 r93ebe1  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: p_Mult_q.cc,v 1.7 2008-02-08 10:11:30 wienand Exp $
     9 *  Version: $Id: p_Mult_q.cc,v 1.8 2008-06-25 11:27:31 Singular Exp $
    1010 *******************************************************************/
    1111#include "mod2.h"
     
    268268poly _p_Mult_q(poly p, poly q, const int copy, const ring r)
    269269{
     270#ifdef HAVE_RINGS
     271  if (!rField_is_Domain(currRing))
     272    return _p_Mult_q_Normal_ZeroDiv(p, q, copy, r);
     273#endif
    270274  int lp, lq, l;
    271275  poly pt;
     
    283287  }
    284288  if (lq < MIN_LENGTH_BUCKET || TEST_OPT_NOT_BUCKETS)
    285 #ifdef HAVE_RINGS
    286     if (!rField_is_Domain(currRing))
    287       return _p_Mult_q_Normal_ZeroDiv(p, q, copy, r);
    288     else
    289 #endif
    290289    return _p_Mult_q_Normal(p, q, copy, r);
    291290  else
Note: See TracChangeset for help on using the changeset viewer.