Changeset cea6f3 in git


Ignore:
Timestamp:
Jan 13, 2006, 7:10:06 PM (18 years ago)
Author:
Oliver Wienand <wienand@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c1c65551e4b3a0de0b13ddf30446f6e9569681b5')
Children:
2e4de3d33d0bea3780e1932fdaf8a41c161f473e
Parents:
4cbb61ba5014a593b9bc6569b497e9a8151bc15f
Message:
RING2TOM Merger


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

Legend:

Unmodified
Added
Removed
  • kernel/Makefile.in

    r4cbb61 rcea6f3  
    100100    longalg.cc longrat.cc longrat0.cc \
    101101    maps.cc matpol.cc misc.cc gnumpfl.cc gnumpc.cc \
     102        rmodulo2m.cc \
    102103    modulop.cc mpr_complex.cc sparsmat.cc fast_maps.cc \
    103104    fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc \
     
    157158        ffields.h khstd.h sparsmat.h gnumpfl.h gnumpc.h \
    158159        fglm.h kstd1.h \
     160        rmodulo2m.h \
    159161    modulop.h sing_dbm.h weight.h \
    160162        fglmgauss.h fglmvec.h \
  • kernel/feOpt.cc

    r4cbb61 rcea6f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: feOpt.cc,v 1.1.1.1 2003-10-06 12:15:51 Singular Exp $ */
     4/* $Id: feOpt.cc,v 1.2 2006-01-13 18:10:04 wienand Exp $ */
    55/*
    66* ABSTRACT: Implementation of option buisness
     
    349349#ifdef HAVE_MPSR
    350350      case FE_OPT_BATCH:
     351#ifndef DEFECT_SINGULAR_OUT
    351352        if (feOptSpec[FE_OPT_BATCH].value)
    352353          fe_fgets_stdin=fe_fgets_dummy;
     354#endif
    353355        return NULL;
    354356#endif
  • kernel/febase.cc

    r4cbb61 rcea6f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: febase.cc,v 1.7 2005-07-27 16:51:02 Singular Exp $ */
     4/* $Id: febase.cc,v 1.8 2006-01-13 18:10:04 wienand Exp $ */
    55/*
    66* ABSTRACT: i/o system
     
    617617    else if (currentVoice->sw==BI_file)
    618618    {
     619#ifdef DEFECT_SINGULAR
     620      feShowPrompt();
     621      s=fe_fgets_stdin(fe_promptstr,
     622                       &(currentVoice->buffer[offset]),
     623                       (4096-1-sizeof(ADDRESS))-offset);
     624      int i=0;
     625      if (s!=NULL)
     626        while((s[i]!='\0') && (i<4096)) {s[i] &= (char)127;i++;}
     627#else
    619628      s=fgets(currentVoice->buffer+offset,(4096-1-sizeof(ADDRESS))-offset,
    620629              currentVoice->files);
     630#endif
    621631    }
    622632    //else /* BI_buffer */ s==NULL  => return 0
  • kernel/feread.cc

    r4cbb61 rcea6f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: feread.cc,v 1.6 2005-05-21 09:16:24 Singular Exp $ */
     4/* $Id: feread.cc,v 1.7 2006-01-13 18:10:04 wienand Exp $ */
    55/*
    66* ABSTRACT: input from ttys, simulating fgets
     
    310310  {
    311311    fprintf(stdout,pr);
     312#ifdef DEFECT_SINGULAR
     313    fprintf(stdout,"\n");
     314#endif
    312315  }
    313316  mflush();
  • kernel/kbuckets.cc

    r4cbb61 rcea6f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kbuckets.cc,v 1.16 2006-01-13 10:56:40 bricken Exp $ */
     4/* $Id: kbuckets.cc,v 1.17 2006-01-13 18:10:04 wienand Exp $ */
    55
    66#include "mod2.h"
     
    1919
    2020#ifdef USE_COEF_BUCKETS
     21#ifdef HAVE_RING_2TOM
     22#define MULTIPLY_BUCKET(B,I) do                                        \
     23  { if (B->coef[I]!=NULL)                                              \
     24    {                                                                  \
     25      B->buckets[I]=p_Mult_q(B->buckets[I],B->coef[I],B->bucket_ring); \
     26      B->coef[I]=NULL;                                                 \
     27    }                                                                  \
     28  } while(0)                                                           \
     29    if (r->cring == 1) bucket->buckets_length[i] = pLength(bucket->buckets[i]);
     30#else
    2131#define MULTIPLY_BUCKET(B,I) do                                        \
    2232  { if (B->coef[I]!=NULL)                                              \
     
    2636    }                                                                  \
    2737  } while(0)
     38#endif
    2839#else
    2940#define MULTIPLY_BUCKET(B,I)
     
    487498}
    488499
    489 
     500//////////////////////////////////////////////////////////////////////////
     501///
     502/// Bucket number i from bucket is out of length sync, resync
     503///
     504void kBucketAdjust(kBucket_pt bucket, int i) {
     505
     506  MULTIPLY_BUCKET(bucket,i);
     507
     508  int l1 = bucket->buckets_length[i];
     509  poly p1 = bucket->buckets[i];
     510  bucket->buckets[i] = NULL;
     511  bucket->buckets_length[i] = 0;
     512  i = pLogLength(l1);
     513
     514  while (bucket->buckets[i] != NULL)
     515  {
     516    //kbTest(bucket);
     517    MULTIPLY_BUCKET(bucket,i);
     518    p1 = p_Add_q(p1, bucket->buckets[i],
     519                 l1, bucket->buckets_length[i], bucket->bucket_ring);
     520    bucket->buckets[i] = NULL;
     521    bucket->buckets_length[i] = 0;
     522    i = pLogLength(l1);
     523  }
     524
     525  bucket->buckets[i] = p1;
     526  bucket->buckets_length[i]=l1;
     527  if (i >= bucket->buckets_used)
     528    bucket->buckets_used = i;
     529  else
     530    kBucketAdjustBucketsUsed(bucket);
     531}
    490532
    491533//////////////////////////////////////////////////////////////////////////
     
    507549      if (i<coef_start)
    508550        bucket->buckets[i] = p_Mult_nn(bucket->buckets[i], n, r);
     551#ifdef HAVE_RING2TOM
     552        if (r->cring == 1) {
     553          bucket->buckets_length[i] = pLength(bucket->buckets[i]);
     554          kBucketAdjust(bucket, i);
     555        }
     556#endif
    509557      else
    510558      if (bucket->coef[i]!=NULL)
    511559      {
    512560        bucket->coef[i] = p_Mult_nn(bucket->coef[i],n,r);
     561#ifdef HAVE_RING_2TOM
     562        if (r->cring == 1 && (long) bucket->coef[i] == 0) {
     563          bucket->coef[i] = NULL;
     564          bucket->buckets[i] = NULL;
     565          bucket->buckets_length[i] = 0;
     566        }
     567#endif
    513568      }
    514569      else
     
    518573#else
    519574      bucket->buckets[i] = p_Mult_nn(bucket->buckets[i], n, r);
     575#ifdef HAVE_RING2TOM
     576      if (r->cring == 1) {
     577        bucket->buckets_length[i] = pLength(bucket->buckets[i]);
     578        kBucketAdjust(bucket, i);
     579      }
     580#endif
    520581#endif
    521582    }
     
    524585#else
    525586  bucket->p = p_Mult_nn(bucket->p, n, bucket->bucket_ring);
     587#ifdef HAVE_RING_2TOM
     588  if (r->cring == 1) bucket->buckets_length[i] = pLength(bucket->buckets[i]);
     589#endif
    526590#endif
    527591}
     
    636700    bucket->buckets[i] = NULL;
    637701    bucket->buckets_length[i] = 0;
     702#ifdef HAVE_RING2TOM
     703    l1 = pLength(p1);
     704    assume(pLength(p1) == l1);
     705#endif   
    638706    i = pLogLength(l1);
    639707  }
     
    647715      i = pLogLength(l1);
    648716    }
    649     else
     717    else {
    650718      p1 = r->p_Procs->pp_Mult_mm(p1, m, r, last);
     719#ifdef HAVE_RING2TOM
     720      l1 = pLength(p1);
     721      i = pLogLength(l1);
     722#endif
     723    }
    651724    pSetCoeff0(m, nNeg(pGetCoeff(m)));
    652725  }
     
    9981071  }
    9991072
    1000   p_ExpVectorSub(lm,p1, bucket->bucket_ring);
     1073  p_ExpVectorSub(lm, p1, bucket->bucket_ring);
    10011074  l1--;
    10021075
  • kernel/kbuckets.h

    r4cbb61 rcea6f3  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: kbuckets.h,v 1.4 2005-12-19 12:11:15 bricken Exp $ */
     6/* $Id: kbuckets.h,v 1.5 2006-01-13 18:10:04 wienand Exp $ */
    77#include "structs.h"
    88#include "p_Procs.h"
     
    6969void kBucketSetLm(kBucket_pt bucket, poly lm);
    7070
     71
     72//////////////////////////////////////////////////////////////////////////
     73///
     74/// Bucket number i from bucket is out of length sync, resync
     75///
     76void kBucketAdjust(kBucket_pt bucket, int i);
    7177
    7278/////////////////////////////////////////////////////////////////////////////
  • kernel/kspoly.cc

    r4cbb61 rcea6f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kspoly.cc,v 1.2 2005-11-27 15:28:44 wienand Exp $ */
     4/* $Id: kspoly.cc,v 1.3 2006-01-13 18:10:04 wienand Exp $ */
    55/*
    66*  ABSTRACT -  Routines for Spoly creation and reductions
     
    4949  kTest_T(PW);
    5050
    51   poly p1 = PR->GetLmTailRing();
    52   poly p2 = PW->GetLmTailRing();
    53   poly t2 = pNext(p2), lm = p1;
    54   assume(p1 != NULL && p2 != NULL);
     51  poly p1 = PR->GetLmTailRing();   // p2 | p1
     52  poly p2 = PW->GetLmTailRing();   // i.e. will reduce p1 with p2; lm = LT(p1) / LM(p2)
     53  poly t2 = pNext(p2), lm = p1;    // t2 = p2 - LT(p2); really compute P = LC(p2)*p1 - LT(p1)/LM(p2)*p2
     54  assume(p1 != NULL && p2 != NULL);// Attention, we have rings and there LC(p2) and LC(p1) are special
    5555  p_CheckPolyRing(p1, tailRing);
    5656  p_CheckPolyRing(p2, tailRing);
     
    8383  }
    8484
    85   if (t2==NULL)
    86   {
     85  if (t2==NULL)           // Divisor is just one term, therefore it will
     86  {                       // just cancel the leading term
    8787    PR->LmDeleteAndIter();
    8888    if (coef != NULL) *coef = n_Init(1, tailRing);
     
    9090  }
    9191
    92   p_ExpVectorSub(lm, p2, tailRing);
     92  p_ExpVectorSub(lm, p2, tailRing); // Calculate the Monomial we must multiply to p2
    9393
    9494  if (tailRing != currRing)
     
    116116    number bn = pGetCoeff(lm);
    117117    number an = pGetCoeff(p2);
    118 #ifdef HAVE_RING2TOM
    119     if (currRing->cring == 1) {
    120       while (((long) an)%2 == 0 && ((long) bn)%2 == 0) {
    121         an = (number) (((long) an) / 2);
    122         bn = (number) (((long) bn) / 2);
    123       }
    124     }
    125 #endif
    126     int ct = ksCheckCoeff(&an, &bn);
    127     p_SetCoeff(lm, bn,tailRing);
     118    int ct = ksCheckCoeff(&an, &bn);    // Calculate special LC
     119    p_SetCoeff(lm, bn, tailRing);
    128120    if ((ct == 0) || (ct == 2))
    129121      PR->Tail_Mult_nn(an);
     
    139131  // and finally,
    140132  PR->Tail_Minus_mm_Mult_qq(lm, t2, PW->GetpLength() - 1, spNoether);
     133  assume(PW->GetpLength() == pLength(PW->p != NULL ? PW->p : PW->t_p));
    141134  PR->LmDeleteAndIter();
    142135#if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
     
    148141  return ret;
    149142}
    150 
    151 #ifdef HAVE_RING2TOM
    152 /***************************************************************
    153  *
    154  * Reduces PR with PW
    155  * Assumes PR != NULL, PW != NULL, Lm(PW) divides Lm(PR)
    156  * as above, just for rings
    157  *
    158  ***************************************************************/
    159 int ksRingReducePoly(LObject* PR,
    160                  TObject* PW,
    161                  poly spNoether,
    162                  number *coef,
    163                  kStrategy strat)
    164 {
    165 #ifdef KDEBUG
    166   red_count++;
    167 #ifdef TEST_OPT_DEBUG_RED
    168   if (TEST_OPT_DEBUG)
    169   {
    170     Print("Red %d:", red_count); PR->wrp(); Print(" with:");
    171     PW->wrp();
    172   }
    173 #endif
    174 #endif
    175   int ret = 0;
    176   ring tailRing = PR->tailRing;
    177   kTest_L(PR);
    178   kTest_T(PW);
    179 
    180   poly p1 = PR->GetLmTailRing();
    181   poly p2 = PW->GetLmTailRing();
    182   poly t2 = pNext(p2), lm = p1;
    183   assume(p1 != NULL && p2 != NULL);
    184   p_CheckPolyRing(p1, tailRing);
    185   p_CheckPolyRing(p2, tailRing);
    186 
    187   pAssume1(p2 != NULL && p1 != NULL &&
    188            p_RingDivisibleBy(p2,  p1, tailRing));
    189 
    190   pAssume1(p_GetComp(p1, tailRing) == p_GetComp(p2, tailRing) ||
    191            (p_GetComp(p2, tailRing) == 0 &&
    192             p_MaxComp(pNext(p2),tailRing) == 0));
    193 
    194   if (t2==NULL)
    195   {
    196     PR->LmDeleteAndIter();
    197     if (coef != NULL) *coef = n_Init(1, tailRing);
    198     return 0;
    199   }
    200 
    201   p_ExpVectorSub(lm, p2, tailRing);
    202 
    203   if (tailRing != currRing)
    204   {
    205     // check that reduction does not violate exp bound
    206     while (PW->max != NULL && !p_LmExpVectorAddIsOk(lm, PW->max, tailRing))
    207     {
    208       // undo changes of lm
    209       p_ExpVectorAdd(lm, p2, tailRing);
    210       if (strat == NULL) return 2;
    211       if (! kStratChangeTailRing(strat, PR, PW)) return -1;
    212       tailRing = strat->tailRing;
    213       p1 = PR->GetLmTailRing();
    214       p2 = PW->GetLmTailRing();
    215       t2 = pNext(p2);
    216       lm = p1;
    217       p_ExpVectorSub(lm, p2, tailRing);
    218       ret = 1;
    219     }
    220   }
    221 
    222   // take care of coef buisness
    223   if (! n_IsOne(pGetCoeff(p2), tailRing))
    224   {
    225     number bn = pGetCoeff(lm);
    226     number an = pGetCoeff(p2);
    227     while (((long) an)%2 == 0 && ((long) bn)%2 == 0) {
    228       an = (number) (((long) an) / 2);
    229       bn = (number) (((long) bn) / 2);
    230     }
    231     int ct = ksCheckCoeff(&an, &bn);
    232     p_SetCoeff(lm, bn,tailRing);
    233     if ((ct == 0) || (ct == 2))
    234       PR->Tail_Mult_nn(an);
    235     if (coef != NULL) *coef = an;
    236     else n_Delete(&an, tailRing);
    237   }
    238   else
    239   {
    240     if (coef != NULL) *coef = n_Init(1, tailRing);
    241   }
    242 
    243 
    244   // and finally,
    245   PR->Tail_Minus_mm_Mult_qq(lm, t2, PW->GetpLength() - 1, spNoether);
    246   PR->LmDeleteAndIter();
    247 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
    248   if (TEST_OPT_DEBUG)
    249   {
    250     Print(" to: "); PR->wrp(); Print("\n");
    251   }
    252 #endif
    253   return ret;
    254 }
    255 #endif
    256143
    257144/***************************************************************
     
    280167  poly a1 = pNext(p1), a2 = pNext(p2);
    281168  number lc1 = pGetCoeff(p1), lc2 = pGetCoeff(p2);
    282 #ifdef HAVE_RING2TOM
    283   if (currRing->cring == 1) {
    284     while (((long) lc1)%2 == 0 && ((long) lc2)%2 == 0) {
    285       lc1 = (number) (((long) lc1) / 2);
    286       lc2 = (number) (((long) lc2) / 2);
    287     }
    288   }
    289 #endif 
    290   int co=0, ct = ksCheckCoeff(&lc1, &lc2);
     169  int co=0, ct = ksCheckCoeff(&lc1, &lc2); // gcd and zero divisors
    291170
    292171  int l1=0, l2=0;
     
    329208  else
    330209    a2 = tailRing->p_Procs->pp_Mult_mm(a2, m2, tailRing,last);
     210#ifdef HAVE_RING2TOM
     211  if (currRing->cring == 1) l2 = pLength(a2);
     212#endif
     213
    331214  Pair->SetLmTail(m2, a2, l2, use_buckets, tailRing, last);
    332215
     
    429312    bn = nIntDiv(bn, cn);
    430313  }
     314#ifdef HAVE_RING2TOM
     315  if (currRing->cring == 1) {
     316    while (((long) an)%2 == 0 && ((long) bn)%2 == 0) {
     317      an = (number) (((long) an) / 2);
     318      bn = (number) (((long) bn) / 2);
     319    }
     320  }
     321#endif
    431322  nDelete(&cn);
    432323  if (nIsOne(an))
  • kernel/kstd2.cc

    r4cbb61 rcea6f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.4 2005-11-27 15:28:44 wienand Exp $ */
     4/* $Id: kstd2.cc,v 1.5 2006-01-13 18:10:04 wienand Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    105105
    106106#ifdef HAVE_RING2TOM
     107/*        Obsolute since changes to pLmDiv
    107108// return -1 if no divisor is found
    108109//        number of first divisor, otherwise
     
    161162  }
    162163}
     164*/
     165
     166long factorial(long arg) {
     167   long tmp = 1;
     168   for (int i = 2; i < arg + 1; i++) {
     169     tmp = tmp * i;
     170   }
     171   return tmp;
     172}
     173
     174poly kFindDivisibleByZeroPoly(LObject* h) {
     175  // m = currRing->ch
     176
     177  int k_ind2 = 0;
     178  int a_ind2 = 0;
     179
     180  poly p = h->GetLmCurrRing();
     181  poly zeroPoly = NULL;
     182  long a = (long) pGetCoeff(p);
     183  long k = 1;
     184
     185  while (a%2 == 0) {
     186    a = a / 2;
     187    a_ind2++;
     188  }
     189
     190  for (int i = 1; i <= currRing->N; i++) {
     191    a = factorial(pGetExp(p, i));
     192    k = k * a;
     193    while (a%2 == 0) {
     194      a = a / 2;
     195      k_ind2++;
     196    }
     197  }
     198  a = (long) pGetCoeff(p);
     199
     200  number tmp1;
     201  poly tmp2, tmp3;
     202  if (currRing->ch <= k_ind2 + a_ind2) {
     203    zeroPoly = p_ISet(a, h->tailRing);
     204    for (int i = 1; i <= currRing->N; i++) {
     205      for (long j = 1; j <= pGetExp(p, i); j++) {
     206        tmp1 = nInit(j);
     207        tmp2 = p_ISet(1, h->tailRing);
     208        p_SetExp(tmp2, i, 1, h->tailRing);
     209        p_Setm(tmp2, h->tailRing);
     210        if (nIsZero(tmp1)) {
     211          zeroPoly = p_Mult_q(zeroPoly, tmp2, h->tailRing);
     212        }
     213        else {
     214          tmp3 = p_ISet((long) tmp1, h->tailRing);
     215          zeroPoly = p_Mult_q(zeroPoly, p_Add_q(tmp2, tmp3, h->tailRing), h->tailRing);
     216        }
     217      }
     218    }
     219    zeroPoly = p_LmDeleteAndNext(zeroPoly, h->tailRing);
     220    tmp2 = pISet(a);
     221    for (int i = 1; i <= currRing->N; i++) {
     222      pSetExp(tmp2, i, pGetExp(p, i));
     223    }
     224    pSetm(tmp2);
     225    pNext(tmp2) = zeroPoly;
     226    return tmp2;
     227  }
     228  if (currRing->ch - k_ind2 <= a_ind2) {
     229    PrintS("Case not implented yet !!!"); PrintLn();
     230    PrintS("But it should not mae any difference."); PrintLn();
     231    return zeroPoly;
     232  }
     233  return NULL;
     234}
    163235
    164236/*2
     
    167239int redRing2toM (LObject* h,kStrategy strat)
    168240{
    169 //  PrintS("redRing2toM");
    170 //  PrintLn();
     241  if (h->p == NULL && h->t_p == NULL) return 0; // spoly is zero (can only occure with zero divisors)
     242
    171243  if (strat->tl<0) return 1;
    172244  int at,d,i;
    173245  int j = 0;
    174246  int pass = 0;
     247  poly zeroPoly;
     248
     249#ifdef HAVE_RING2TOM
     250  h->SetpFDeg();
     251  assume(h->pFDeg() == h->FDeg);
     252  if (h->pFDeg() != h->FDeg) {
     253    Print("h->pFDeg()=%d =!= h->FDeg=%d\n", h->pFDeg(), h->FDeg);
     254  }
     255  long reddeg = h->SetpFDeg();
     256#else
    175257  assume(h->pFDeg() == h->FDeg);
    176258  long reddeg = h->GetpFDeg();
     259#endif
    177260
    178261  h->SetShortExpVector();
    179262  loop
    180263  {
    181     j = kRingFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h);
    182     if (j < 0) return 1;
    183 
     264    zeroPoly = NULL; //kFindDivisibleByZeroPoly(h);
     265    if (zeroPoly != NULL) {
     266#ifdef KDEBUG
     267      if (TEST_OPT_DEBUG)
     268      {
     269        PrintS("zero red:");
     270      }
     271#endif
     272      LObject tmp_h(zeroPoly, currRing, strat->tailRing);
     273      tmp_h.SetShortExpVector();
     274      strat->initEcart(&tmp_h);
     275      tmp_h.sev = pGetShortExpVector(tmp_h.p);
     276      tmp_h.SetpFDeg();
     277
     278      enterT(tmp_h, strat, strat->tl + 1);
     279      j = strat->tl;
     280    }
     281    else {
     282      j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h);
     283      if (j < 0) return 1;
     284#ifdef KDEBUG
     285      if (TEST_OPT_DEBUG)
     286      {
     287        PrintS("T red:");
     288      }
     289#endif
     290    }
    184291#ifdef KDEBUG
    185292    if (TEST_OPT_DEBUG)
    186293    {
    187       PrintS("red:");
    188294      h->wrp();
    189295      PrintS(" with ");
     
    192298#endif
    193299
    194     ksRingReducePoly(h, &(strat->T[j]), NULL, NULL, strat);
     300    ksReducePoly(h, &(strat->T[j]), NULL, NULL, strat);
     301//    if (zeroPoly != NULL) {
     302//      strat->tl--;
     303//    }
    195304
    196305#ifdef KDEBUG
     
    229338        if (TEST_OPT_DEBUG) Print(" ->L[%d]\n",at);
    230339#endif
    231         enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
     340        enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);     // NOT RING CHECKED OLIVER
    232341        h->Clear();
    233342        return -1;
     
    556665  loop
    557666  {
     667/* Obsolete since change in pLmDiv
    558668#ifdef HAVE_RING2TOM
    559669    if (currRing->cring == 1) {
     
    562672    else
    563673#endif
     674*/
    564675      j=kFindDivisibleByInS(strat->S,strat->sevS,strat->sl,&P);
    565676    if (j>=0)
     
    578689      if (rIsPluralRing(currRing))
    579690      {
    580         number coef;
     691            number coef;
    581692        nc_kBucketPolyRed(P.bucket,strat->S[j],&coef);
    582         nDelete(&coef);
     693            nDelete(&coef);
    583694      }
    584695      else
     
    589700        nDelete(&coef);
    590701      }
    591       h = kBucketGetLm(P.bucket);
     702      h = kBucketGetLm(P.bucket);   // FRAGE OLIVER
    592703      if (h==NULL)
    593704      {
     
    667778#ifdef HAVE_RING2TOM
    668779    if (TEST_OPT_DEBUG) PrintS("--- next step ---\n");
    669 #endif   
     780#endif
    670781    if (TEST_OPT_DEBUG) messageSets(strat);
    671782#endif
     
    715826    }
    716827
    717     if (TEST_OPT_PROT)
    718       message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),
    719               &olddeg,&reduc,strat, red_result);
    720 
    721     /* reduction of the element choosen from L */
    722     red_result = strat->red(&strat->P,strat);
     828#ifdef HAVE_RING2TOM
     829    if (strat->P.p == NULL && strat->P.t_p == NULL) {
     830      red_result = 0;
     831    }
     832    else
     833#endif
     834    {
     835      if (TEST_OPT_PROT)
     836        message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),
     837                &olddeg,&reduc,strat, red_result);
     838
     839      /* reduction of the element choosen from L */
     840      red_result = strat->red(&strat->P,strat);
     841    }
    723842
    724843    // reduction to non-zero new poly
  • kernel/kutil.cc

    r4cbb61 rcea6f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.12 2005-11-27 15:28:45 wienand Exp $ */
     4/* $Id: kutil.cc,v 1.13 2006-01-13 18:10:04 wienand Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    930930  // this should be corrected
    931931  assume(p.FDeg == p.pFDeg());
     932
    932933  if ((*length)>=0)
    933934  {
     
    10041005  pLcm(p,strat->S[i],Lp.lcm);
    10051006  pSetm(Lp.lcm);
     1007#ifdef HAVE_RING2TOM
     1008  if (strat->sugarCrit && currRing->cring == 0)
     1009#else
    10061010  if (strat->sugarCrit)
     1011#endif
    10071012  {
    10081013    if(
     
    10751080  {
    10761081#ifdef HAVE_PLURAL
    1077     if (!rIsPluralRing(currRing))
    1078     {
     1082    if (!rIsPluralRing(currRing)) {
    10791083    // if currRing->nc_type!=quasi (or skew)
    10801084#endif
     
    13531357          if (strat->L[j].p == strat->tail)
    13541358          {
    1355             deleteInL(strat->L,&strat->Ll,j,strat);
    1356             strat->c3++;
     1359              deleteInL(strat->L,&strat->Ll,j,strat);
     1360              strat->c3++;
    13571361          }
    13581362        }
     
    27562760  }
    27572761}
    2758 
     2762/*
    27592763#ifdef HAVE_RING2TOM
    27602764TObject*
     
    28282832}
    28292833#endif
     2834*/
    28302835
    28312836poly redtail (LObject* L, int pos, kStrategy strat)
     
    29072912poly redtailBba (LObject* L, int pos, kStrategy strat, BOOLEAN withT)
    29082913{
    2909 #ifdef HAVE_RING2TOM
    2910   PrintS("Warning, redtail Bba not fully ring checked"); PrintLn();
    2911 #endif
    29122914  strat->redTailChange=FALSE;
    29132915  if (strat->noTailReduction) return L->GetLmCurrRing();
     
    29372939      if (! withT)
    29382940      {
     2941/* obsolete
    29392942#ifdef HAVE_RING2TOM
    29402943        if (currRing->cring == 1) {
     
    29422945        } else
    29432946#endif
     2947*/
    29442948            With = kFindDivisibleByInS(strat, pos, &Ln, &With_s);
    29452949        if (With == NULL) break;
     
    29482952      {
    29492953        int j;
     2954/* Obsolete
    29502955#ifdef HAVE_RING2TOM
    29512956        if (currRing->cring == 1) {
     
    29532958        } else
    29542959#endif
     2960*/
    29552961           j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, &Ln);
    29562962        if (j < 0) break;
     
    35373543  while (j <= maxIndex)
    35383544  {
     3545#ifdef HAVE_RING2TOM
     3546    if ((currRing->cring == 1 && pLmRingShortDivisibleBy(strat->S[j],strat->sevS[j], h, not_sev)) ||
     3547        (currRing->cring == 0 && pLmShortDivisibleBy(strat->S[j],strat->sevS[j], h, not_sev)))
     3548#else
    35393549    if (pLmShortDivisibleBy(strat->S[j],strat->sevS[j], h, not_sev))
     3550#endif
    35403551    {
    35413552      h = ksOldSpolyRed(strat->S[j],h,strat->kNoetherTail());
     
    36013612  int i, suc=0;
    36023613  poly redSi=NULL;
    3603 //Print("nach initS: updateS start mit sl=%d\n",(strat->sl));
     3614//  Print("nach initS: updateS start mit sl=%d\n",(strat->sl));
    36043615//  for (i=0; i<=(strat->sl); i++)
    36053616//  {
     
    36083619//    pWrite(strat->S[i]);
    36093620//  }
     3621//  Print("pOrdSgn=%d\n", pOrdSgn);
    36103622  if (pOrdSgn==1)
    36113623  {
  • kernel/kutil.h

    r4cbb61 rcea6f3  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: kutil.h,v 1.8 2005-12-19 13:56:05 bricken Exp $ */
     6/* $Id: kutil.h,v 1.9 2006-01-13 18:10:05 wienand Exp $ */
    77/*
    88* ABSTRACT: kernel: utils for kStd
     
    438438                    long ecart = LONG_MAX);
    439439
     440/*Obsolete since changes to pLmDiv
    440441#ifdef HAVE_RING2TOM
    441442// same for rings
     
    450451                    long ecart = LONG_MAX);
    451452#endif
    452 
     453*/
    453454/***************************************************************
    454455 *
  • kernel/pInline1.h

    r4cbb61 rcea6f3  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: pInline1.h,v 1.3 2005-11-27 15:28:45 wienand Exp $
     9 *  Version: $Id: pInline1.h,v 1.4 2006-01-13 18:10:05 wienand Exp $
    1010 *******************************************************************/
    1111#ifndef PINLINE1_H
     
    366366  }
    367367  pDivAssume(p_DebugLmDivisibleByNoComp(a, b, r) == TRUE);
     368#ifdef HAVE_RING2TOM
     369  if (r->cring == 1) {
     370    long lside = (long) p_GetCoeff(a, r);
     371    long rside = (long) p_GetCoeff(b, r);
     372    // Später durch bitvergleiche viel schneller TODO OLIVER
     373    while (lside%2 == 0 && rside%2 == 0) {
     374      lside = lside / 2;
     375      rside = rside / 2;
     376    }
     377    return (lside%2 != 0);
     378  }
     379  else
     380#endif
    368381  return TRUE;
    369382}
     
    385398static inline BOOLEAN _p_LmRingDivisibleByNoComp(poly a, poly b, ring r)
    386399{
    387   int i=r->VarL_Size - 1;
    388   unsigned long divmask = r->divmask;
    389   unsigned long la, lb;
    390 
    391   if (r->VarL_LowIndex >= 0)
    392   {
    393     i += r->VarL_LowIndex;
    394     do
    395     {
    396       la = a->exp[i];
    397       lb = b->exp[i];
    398       if ((la > lb) ||
    399           (((la & divmask) ^ (lb & divmask)) != ((lb - la) & divmask)))
    400       {
    401         pDivAssume(p_DebugLmDivisibleByNoComp(a, b, r) == FALSE);
    402         return FALSE;
    403       }
    404       i--;
    405     }
    406     while (i>=r->VarL_LowIndex);
    407   }
    408   else
    409   {
    410     do
    411     {
    412       la = a->exp[r->VarL_Offset[i]];
    413       lb = b->exp[r->VarL_Offset[i]];
    414       if ((la > lb) ||
    415           (((la & divmask) ^ (lb & divmask)) != ((lb - la) & divmask)))
    416       {
    417         pDivAssume(p_DebugLmDivisibleByNoComp(a, b, r) == FALSE);
    418         return FALSE;
    419       }
    420       i--;
    421     }
    422     while (i>=0);
    423   }
    424   pDivAssume(p_DebugLmDivisibleByNoComp(a, b, r) == TRUE);
    425   long lside = (long) p_GetCoeff(a,r);
    426   long rside = (long) p_GetCoeff(b,r);
    427   // Später durch bitvergleiche viel schneller  TODO OLIVER
    428   //Print("lside=%d", lside); PrintLn();
    429   //Print("rside=%d", rside); PrintLn();
    430   while (lside%2 == 0 && rside%2 == 0) {
    431     lside = lside / 2;
    432     rside = rside / 2;
    433   }
    434   //Print("lside=%d", lside); PrintLn();
    435   //Print("rside=%d", rside); PrintLn();
    436   return (lside%2 != 0);
     400  BOOLEAN mDiv = _p_LmDivisibleByNoComp(a, b, r);
     401  if (mDiv) {
     402    long lside = (long) p_GetCoeff(a,r);
     403    long rside = (long) p_GetCoeff(b,r);
     404    // Später durch bitvergleiche viel schneller  TODO OLIVER
     405    while (lside%2 == 0 && rside%2 == 0) {
     406      lside = lside / 2;
     407      rside = rside / 2;
     408    }
     409    return (lside%2 != 0);
     410  }
     411  return false;
    437412}
    438413#endif
     
    450425  }
    451426  while (i);
    452   return TRUE;
     427#ifdef HAVE_RING2TOM
     428  if (r_a->cring == 1 || r_b->cring == 1) {
     429    long lside = (long) p_GetCoeff(a, r_a);
     430    long rside = (long) p_GetCoeff(b, r_b);
     431    // Später durch bitvergleiche viel schneller TODO OLIVER
     432    while (lside%2 == 0 && rside%2 == 0) {
     433      lside = lside / 2;
     434      rside = rside / 2;
     435    }
     436    return (lside%2 != 0);
     437  }
     438  else
     439#endif
     440    return TRUE;
    453441}
    454442
     
    456444static inline BOOLEAN _p_LmRingDivisibleByNoComp(poly a, ring r_a, poly b, ring r_b)
    457445{
    458   int i=r_a->N;
    459   pAssume1(r_a->N == r_b->N);
    460 
    461   do
    462   {
    463     if (p_GetExp(a,i,r_a) > p_GetExp(b,i,r_b))
    464       return FALSE;
    465     i--;
    466   }
    467   while (i);
    468   long lside = (long) p_GetCoeff(a, r_a);
    469   long rside = (long) p_GetCoeff(b, r_b);
    470   // Später durch bitvergleiche viel schneller TODO OLIVER
    471   //Print("lside=%d", lside); PrintLn();
    472   //Print("rside=%d", rside); PrintLn();
    473   while (lside%2 == 0 && rside%2 == 0) {
    474     lside = lside / 2;
    475     rside = rside / 2;
    476   }
    477   //Print("lside=%d", lside); PrintLn();
    478   //Print("rside=%d", rside); PrintLn();
    479   return (lside%2 != 0);
     446  BOOLEAN mDiv = _p_LmDivisibleByNoComp(a, r_a, b, r_b);
     447  if (mDiv) {
     448    long lside = (long) p_GetCoeff(a, r_a);
     449    long rside = (long) p_GetCoeff(b, r_b);
     450    // Später durch bitvergleiche viel schneller TODO OLIVER
     451    while (lside%2 == 0 && rside%2 == 0) {
     452      lside = lside / 2;
     453      rside = rside / 2;
     454    }
     455    return (lside%2 != 0);
     456  }
     457  return false;
    480458}
    481459#endif
     
    525503
    526504  if (a != NULL && (p_GetComp(a, r) == 0 || p_GetComp(a,r) == p_GetComp(b,r)))
    527     return _p_LmDivisibleByNoComp(a,b,r);
     505#ifdef HAVE_RING2TOM
     506    if (r->cring == 1) {
     507      return _p_LmRingDivisibleByNoComp(a,b,r);
     508    }
     509    else
     510#endif
     511      return _p_LmDivisibleByNoComp(a,b,r);
    528512  return FALSE;
    529513}
     
    532516  pIfThen1(b!=NULL, p_LmCheckPolyRing1(b, r_b));
    533517  pIfThen1(a!=NULL, p_LmCheckPolyRing1(a, r_a));
    534   if (a != NULL) return _p_LmDivisibleBy(a, r_a, b, r_b);
     518  if (a != NULL) {
     519#ifdef HAVE_RING2TOM
     520    if (r_a->cring == 1) {
     521      return _p_LmRingDivisibleByNoComp(a, r_a, b, r_b);
     522    }
     523    else
     524#endif
     525      return _p_LmDivisibleBy(a, r_a, b, r_b);
     526  }
    535527  return FALSE;
    536528}
  • kernel/p_Minus_mm_Mult_qq__T.cc

    r4cbb61 rcea6f3  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: p_Minus_mm_Mult_qq__T.cc,v 1.2 2005-11-27 15:28:45 wienand Exp $
     9 *  Version: $Id: p_Minus_mm_Mult_qq__T.cc,v 1.3 2006-01-13 18:10:05 wienand Exp $
    1010 *******************************************************************/
    1111
     
    104104  a = pNext(a) = qm;       // append qm to result and advance q
    105105#ifdef HAVE_RING2TOM
    106   }
     106  } else { shorter =+ 1; }
    107107  n_Delete(&tb, r);
    108108#endif 
  • kernel/p_Mult_mm__T.cc

    r4cbb61 rcea6f3  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: p_Mult_mm__T.cc,v 1.1.1.1 2003-10-06 12:16:00 Singular Exp $
     9 *  Version: $Id: p_Mult_mm__T.cc,v 1.2 2006-01-13 18:10:05 wienand Exp $
    1010 *******************************************************************/
    1111
     
    1919LINKAGE poly p_Mult_mm(poly p, const poly m, const ring ri)
    2020{
     21  poly before = p;
    2122  p_Test(p, ri);
    2223  p_LmTest(m, ri);
     
    3334  {
    3435    pn = pGetCoeff(p);
    35     pSetCoeff0(p, n_Mult(ln, pn, ri));
    36     n_Delete(&pn, ri);
    37     p_MemAdd(p->exp, m_e, length);
    38     p_MemAddAdjust(p, ri);
    39     p = pNext(p);
     36    number tmp = n_Mult(ln, pn, ri);
     37#ifdef HAVE_RING2TOM
     38    if (n_IsZero(tmp, ri)) {
     39      if (before == p) {
     40        p = pNext(p);
     41        before = p;
     42        q = p;
     43      }
     44      else {
     45        pNext(before) = pNext(p);
     46        p_LmFree(p, ri);
     47        p = pNext(before);
     48      }
     49    }
     50    else
     51#endif
     52    {
     53      pSetCoeff0(p, tmp);
     54      n_Delete(&pn, ri);
     55      p_MemAdd(p->exp, m_e, length);
     56      p_MemAddAdjust(p, ri);
     57#ifdef HAVE_RING_2TOM
     58      before = p;
     59#endif
     60      p = pNext(p);
     61    }
    4062  }
    4163  p_Test(q, ri);
  • kernel/p_Mult_nn__T.cc

    r4cbb61 rcea6f3  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: p_Mult_nn__T.cc,v 1.1.1.1 2003-10-06 12:16:00 Singular Exp $
     9 *  Version: $Id: p_Mult_nn__T.cc,v 1.2 2006-01-13 18:10:05 wienand Exp $
    1010 *******************************************************************/
    1111
     
    2525  while (p != NULL)
    2626  {
    27     number nc = pGetCoeff(p);
    28     pSetCoeff0(p, n_Mult(n, nc, r));
    29     n_Delete(&nc, r);
    30     pIter(p);
     27    number tmp = n_Mult(n, pGetCoeff(p), r);
     28#ifdef HAVE_RING2TOM
     29    if (r->cring==0 || (r->cring ==1 && (long) tmp != 0)){
     30#endif
     31       pSetCoeff0(p, tmp);
     32       pIter(p);
     33#ifdef HAVE_RING2TOM
     34    }
     35    else {
     36      p = pNext(p);    // TODO Free Monom OLIVER
     37    }
     38#endif
     39    n_Delete(&tmp, r);
    3140  }
    3241  p_Test(q, r);
  • kernel/p_Mult_q.cc

    r4cbb61 rcea6f3  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: p_Mult_q.cc,v 1.1.1.1 2003-10-06 12:16:00 Singular Exp $
     9 *  Version: $Id: p_Mult_q.cc,v 1.2 2006-01-13 18:10:05 wienand Exp $
    1010 *******************************************************************/
    1111#include "mod2.h"
     
    165165
    166166  poly res = pp_Mult_mm(p,q,r);     // holds initially q1*p
     167#ifdef HAVE_RING2TOM
     168  if (res == NULL) {
     169    res = p_ISet(1, r);
     170    p_SetCoeff(res, (number) 0, r);
     171  }
     172#endif
    167173  poly qq = pNext(q);               // we iter of this
    168174  poly qn = pp_Mult_mm(qq, p,r);    // holds p1*qi
     
    174180  // now the main loop
    175181  Top:
     182#ifdef HAVE_RING2TOM
     183  if (qn == NULL && rn == NULL) goto Work;
     184  if (qn == NULL) goto Greater;
     185#endif
    176186  if (rn == NULL) goto Smaller;
    177187  p_LmCmpAction(rn, qn, r, goto Equal, goto Greater, goto Smaller);
     
    188198  rr = qn;
    189199  pIter(qn);
     200
    190201  Work: // compute res + Lm(qq)*pp
    191202  if (rn == NULL)
     
    226237    p_Delete(&q, r);
    227238  }
     239#ifdef HAVE_RING2TOM
     240  if (n_IsZero(p_GetCoeff(res, r), r)) {
     241    res = p_LmDeleteAndNext(res, r);
     242  }
     243#endif
    228244  p_Test(res, r);
    229245  return res;
  • kernel/polys.h

    r4cbb61 rcea6f3  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: polys.h,v 1.7 2005-11-27 15:28:45 wienand Exp $ */
     6/* $Id: polys.h,v 1.8 2006-01-13 18:10:05 wienand Exp $ */
    77/*
    88* ABSTRACT - all basic methods to manipulate polynomials of the
     
    174174#define pLmShortDivisibleBy(a, sev_a, b, not_sev_b) \
    175175  p_LmShortDivisibleBy(a, sev_a, b, not_sev_b, currRing)
     176#define pLmRingShortDivisibleBy(a, sev_a, b, not_sev_b) \
     177  p_LmRingShortDivisibleBy(a, sev_a, b, not_sev_b, currRing)
    176178// returns the "Short Exponent Vector" -- used to speed up divisibility
    177179// tests (see polys-impl.cc )
  • kernel/polys1.cc

    r4cbb61 rcea6f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: polys1.cc,v 1.16 2005-11-27 15:28:46 wienand Exp $ */
     4/* $Id: polys1.cc,v 1.17 2006-01-13 18:10:05 wienand Exp $ */
    55
    66/*
     
    484484{
    485485#ifdef HAVE_RING2TOM
    486   if (currRing->cring!=0) return;  //TODO OLIVER
     486  if (currRing->cring != 0) {
     487    if (ph!=NULL)
     488    {
     489      number k = nGetUnit(pGetCoeff(ph));
     490      poly h;
     491      if (!nIsOne(k))
     492      {
     493        k = nGetUnit(pGetCoeff(ph));
     494        pSetCoeff0(ph, nDiv(pGetCoeff(ph), k));
     495        h = pNext(ph);
     496        while (h != NULL)
     497        {
     498          pSetCoeff(h, nDiv(pGetCoeff(h), k));
     499          pIter(h);
     500        }
     501        nDelete(&k);
     502      }
     503     return;
     504    }
     505    return;  //TODO OLIVER
     506  }
    487507#endif
    488508  number h,d;
     
    10171037#ifdef HAVE_RING2TOM
    10181038  if (currRing->cring == 1) {
    1019     pNorm(ph);
     1039    pContent(ph);
    10201040    return;
    10211041  }
  • kernel/pp_Mult_nn__T.cc

    r4cbb61 rcea6f3  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: pp_Mult_nn__T.cc,v 1.1.1.1 2003-10-06 12:16:02 Singular Exp $
     9 *  Version: $Id: pp_Mult_nn__T.cc,v 1.2 2006-01-13 18:10:05 wienand Exp $
    1010 *******************************************************************/
    1111
     
    2828  do
    2929  {
    30     p_AllocBin(pNext(q), bin, r);
    31     q = pNext(q);
    3230    number nc = pGetCoeff(p);
    33     pSetCoeff0(q, n_Mult(n, nc, r));
    34     p_MemCopy(q->exp, p->exp, length);
     31    number tmp = n_Mult(n, nc, r);
     32#ifdef HAVE_RING2TOM
     33    if (r->cring==0 || (r->cring ==1 && (long) tmp != 0)){
     34#endif
     35      p_AllocBin(pNext(q), bin, r);
     36      q = pNext(q);
     37      pSetCoeff0(q, tmp);
     38      p_MemCopy(q->exp, p->exp, length);
     39#ifdef HAVE_RING2TOM
     40    }
     41#endif
    3542    pIter(p);
    3643  }
  • kernel/ringgb.cc

    r4cbb61 rcea6f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ringgb.cc,v 1.2 2005-11-27 15:28:46 wienand Exp $ */
     4/* $Id: ringgb.cc,v 1.3 2006-01-13 18:10:05 wienand Exp $ */
    55/*
    66* ABSTRACT: ringgb interface
    77*/
    8 #define HAVE_TAIL_RING
     8//#define HAVE_TAIL_RING
    99#define NO_BUCKETS
    1010
  • kernel/rmodulo2m.cc

    r4cbb61 rcea6f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: rmodulo2m.cc,v 1.1 2005-11-27 16:30:09 wienand Exp $ */
     4/* $Id: rmodulo2m.cc,v 1.2 2006-01-13 18:10:06 wienand Exp $ */
    55/*
    66* ABSTRACT: numbers modulo 2^m
     
    114114}
    115115
    116 #ifdef HAVE_DIV_MOD
     116//#ifdef HAVE_DIV_MOD
    117117#if 1 //ifdef HAVE_NTL // in ntl.a
    118118//extern void XGCD(long& d, long& s, long& t, long a, long b);
     
    178178      return s;
    179179}
    180 #endif
     180//#endif
    181181
    182182inline number nr2mInversM (number c)
    183183{
    184   long a = (long) c;
    185   long b = 1;
    186   while (a != 1) {
    187     a = a * (long) c % nr2mModul;
    188     b = b * (long) c;
    189   }
    190   return (number) b;
     184  // Table !!!
     185  long inv;
     186  inv = InvMod((long)c);
     187  return (number) inv;
    191188}
    192189
Note: See TracChangeset for help on using the changeset viewer.