Changeset 009d80 in git for kernel/pDebug.cc


Ignore:
Timestamp:
May 10, 2007, 10:12:44 AM (17 years ago)
Author:
Oliver Wienand <wienand@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
4cd2f891f36b9e1d58f0aeaa4683254f54088298
Parents:
4bebba7353438f052b4ad581ede34fa6f31e5a71
Message:
new compile switch: HAVE_RINGS
at total there are now: HAVE_RINGS, HAVE_RING2TOM, HAVE_RINGMODN

kspoly.cc, kstd1.cc, kstd2.cc, kutil.cc, kspoly.cc, polys.cc, ring.*:
adaption of new switches and rField_is_Ring method

numbers.*:
introduced new operation:
  nDivBy(a, b) = Is a divisible by b?

pDebig.cc, pInline1.h:
use of new nDivBy method

p_Mult_q:
new routine for rings

p_*, pp_*:
template switch HAVE_ZERODIVISOR

polys1.cc:
poly exponentation, switches

rmodulo*:
nDivBy implementation, DBTest

structs.h:
nDivBy, ringtype, ringflaga, ringflagb


git-svn-id: file:///usr/local/Singular/svn/trunk@10029 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/pDebug.cc

    r4bebba r009d80  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: pDebug.cc,v 1.6 2007-05-07 16:23:04 Singular Exp $
     9 *  Version: $Id: pDebug.cc,v 1.7 2007-05-10 08:12:42 wienand Exp $
    1010 *******************************************************************/
    1111
     
    140140  }
    141141  while (i);
    142 #ifdef HAVE_RINGMODN
    143   if (currRing->cring == 2)
    144   {
    145     WarnS("Not implemenet, 2007-05-03 12:22:46");
    146   }
     142#ifdef HAVE_RINGS
     143  return nDivBy(pGetCoeff(b), pGetCoeff(a));
     144#else
     145  return TRUE;
    147146#endif
    148 #ifdef HAVE_RING2TOM
    149   if (r->cring == 1) {
    150      long lside = (long) pGetCoeff(a);
    151      long rside = (long) pGetCoeff(b);
    152      while (lside%2 == 0 && rside%2 == 0) {
    153        lside = lside / 2;
    154        rside = rside / 2;
    155147     }
    156      return (lside%2 != 0);
    157   }
    158   else
    159 #endif 
    160      return TRUE;
    161 }
    162148
    163149
Note: See TracChangeset for help on using the changeset viewer.