source: git/Singular/polys.cc @ bef194

spielwiese
Last change on this file since bef194 was bef194, checked in by Olaf Bachmann <obachman@…>, 23 years ago
* new options: redThrough and oldStd * increased version to 1.3.11 git-svn-id: file:///usr/local/Singular/svn/trunk@4926 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 16.5 KB
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/* $Id: polys.cc,v 1.72 2000-12-18 13:30:38 obachman Exp $ */
5
6/*
7* ABSTRACT - all basic methods to manipulate polynomials
8*/
9
10/* includes */
11#include <stdio.h>
12#include <string.h>
13#include <ctype.h>
14#include "mod2.h"
15#include "tok.h"
16#include "omalloc.h"
17#include "febase.h"
18#include "numbers.h"
19#include "polys.h"
20#include "ring.h"
21
22/* ----------- global variables, set by pSetGlobals --------------------- */
23/* computes length and maximal degree of a POLYnomial */
24pLDegProc pLDeg;
25/* computes the degree of the initial term, used for std */
26pFDegProc pFDeg;
27/* the monomial ordering of the head monomials a and b */
28/* returns -1 if a comes before b, 0 if a=b, 1 otherwise */
29
30int pVariables;     // number of variables
31
32/* 1 for polynomial ring, -1 otherwise */
33int     pOrdSgn;
34// it is of type int, not BOOLEAN because it is also in ip
35/* TRUE if the monomial ordering is not compatible with pFDeg */
36BOOLEAN pLexOrder;
37
38/* ----------- global variables, set by procedures from hecke/kstd1 ----- */
39/* the highest monomial below pHEdge */
40poly      ppNoether = NULL;
41
42/* -------------------------------------------------------- */
43/*2
44* change all global variables to fit the description of the new ring
45*/
46
47
48void pSetGlobals(ring r, BOOLEAN complete)
49{
50  int i;
51  if (ppNoether!=NULL) pDelete(&ppNoether);
52  pVariables = r->N;
53  pOrdSgn = r->OrdSgn;
54  pFDeg=r->pFDeg;
55  pLDeg=r->pLDeg;
56  pLexOrder=r->LexOrder;
57
58  if (complete)
59  {
60    if ((r->LexOrder) || (r->OrdSgn==-1))
61      test &= ~Sy_bit(OPT_REDTAIL); /* noredTail */
62
63    if (!TEST_OPT_OLDSTD && r->OrdSgn == 1 && ! r->LexOrder)
64      test |= Sy_bit(OPT_REDTHROUGH);
65    else
66      test &= ~Sy_bit(OPT_REDTHROUGH);
67  }
68}
69
70
71/*2
72* assumes that the head term of b is a multiple of the head term of a
73* and return the multiplicant *m
74*/
75poly pDivide(poly a, poly b)
76{
77  int i;
78  poly result = pInit();
79
80  for(i=(int)pVariables; i; i--)
81    pSetExp(result,i, pGetExp(a,i)- pGetExp(b,i));
82  pSetComp(result, pGetComp(a) - pGetComp(b));
83  pSetm(result);
84  return result;
85}
86
87/*2
88* divides a by the monomial b, ignores monomials wihich are not divisible
89* assumes that b is not NULL
90*/
91poly pDivideM(poly a, poly b)
92{
93  if (a==NULL) return NULL;
94  poly result=a;
95  poly prev=NULL;
96  int i;
97  number inv=nInvers(pGetCoeff(b));
98
99  while (a!=NULL)
100  {
101    if (pDivisibleBy(b,a))
102    {
103      for(i=(int)pVariables; i; i--)
104         pSubExp(a,i, pGetExp(b,i));
105      pSubComp(a, pGetComp(b));
106      pSetm(a);
107      prev=a;
108      pIter(a);
109    }
110    else
111    {
112      if (prev==NULL)
113      {
114        pDeleteLm(&result);
115        a=result;
116      }
117      else
118      {
119        pDeleteLm(&pNext(prev));
120        a=pNext(prev);
121      }
122    }
123  }
124  pMult_nn(result,inv);
125  nDelete(&inv);
126  pDelete(&b);
127  return result;
128}
129
130/*2
131* returns the LCM of the head terms of a and b in *m
132*/
133void pLcm(poly a, poly b, poly m)
134{
135  int i;
136  for (i=pVariables; i; i--)
137  {
138    pSetExp(m,i, max( pGetExp(a,i), pGetExp(b,i)));
139  }
140  pSetComp(m, max(pGetComp(a), pGetComp(b)));
141  /* Don't do a pSetm here, otherwise hres/lres chockes */
142}
143
144/*2
145* convert monomial given as string to poly, e.g. 1x3y5z
146*/
147char * p_Read(char *st, poly &rc, ring r)
148{
149  int i,j;
150  rc = p_Init(r);
151  char *s = r->cf->nRead(st,&(rc->coef));
152  if (s==st)
153  /* i.e. it does not start with a coeff: test if it is a ringvar*/
154  {
155    j = r_IsRingVar(s,r);
156    if (j >= 0)
157    {
158      p_IncrExp(rc,1+j,r);
159      while (*s!='\0') s++;
160      goto done;
161    }
162  }
163  while (*s!='\0')
164  {
165    char ss[2];
166    ss[0] = *s++;
167    ss[1] = '\0';
168    j = r_IsRingVar(ss,r);
169    if (j >= 0)
170    {
171      s = eati(s,&i);
172      p_AddExp(rc,1+j, (Exponent_t)i, r);
173    }
174    else
175    {
176      s--;
177      return s;
178    }
179  }
180done:
181  if (r->cf->nIsZero(pGetCoeff(rc))) p_DeleteLm(&rc,r);
182  else
183  {
184    p_Setm(rc,r);
185  }
186  return s;
187}
188
189poly pmInit(char *st, BOOLEAN &ok)
190{
191  poly p;
192  char *s=p_Read(st,p,currRing);
193  if (*s!='\0')
194  {
195    if ((s!=st)&&isdigit(st[0]))
196    {
197      errorreported=TRUE;
198    }
199    ok=FALSE;
200    pDelete(&p);
201    return NULL;
202  }
203  ok=!errorreported;
204  return p;
205}
206
207/*2
208*make p homgeneous by multiplying the monomials by powers of x_varnum
209*/
210poly pHomogen (poly p, int varnum)
211{
212  poly q=NULL;
213  poly res;
214  int  o,ii;
215
216  if (p!=NULL)
217  {
218    if ((varnum < 1) || (varnum > pVariables))
219    {
220      return NULL;
221    }
222    o=pWTotaldegree(p);
223    q=pNext(p);
224    while (q != NULL)
225    {
226      ii=pWTotaldegree(q);
227      if (ii>o) o=ii;
228      pIter(q);
229    }
230    q = pCopy(p);
231    res = q;
232    while (q != NULL)
233    {
234      ii = o-pWTotaldegree(q);
235      if (ii!=0)
236      {
237        pAddExp(q,varnum, (Exponent_t)ii);
238        pSetm(q);
239      }
240      pIter(q);
241    }
242    q = pOrdPolyInsertSetm(res);
243  }
244  return q;
245}
246
247/*2
248*replaces the maximal powers of the leading monomial of p2 in p1 by
249*the same powers of n, utility for dehomogenization
250*/
251poly pDehomogen (poly p1,poly p2,number n)
252{
253  polyset P;
254  int     SizeOfSet=5;
255  int     i;
256  poly    p;
257  number  nn;
258
259  P = (polyset)omAlloc0(5*sizeof(poly));
260  //for (i=0; i<5; i++)
261  //{
262  //  P[i] = NULL;
263  //}
264  pCancelPolyByMonom(p1,p2,&P,&SizeOfSet);
265  p = P[0];
266  //P[0] = NULL ;// for safety, may be remoeved later
267  for (i=1; i<SizeOfSet; i++)
268  {
269    if (P[i] != NULL)
270    {
271      nPower(n,i,&nn);
272      pMult_nn(P[i],nn);
273      p = pAdd(p,P[i]);
274      //P[i] =NULL; // for safety, may be removed later
275      nDelete(&nn);
276    }
277  }
278  omFreeSize((ADDRESS)P,SizeOfSet*sizeof(poly));
279  return p;
280}
281
282/*4
283*Returns the exponent of the maximal power of the leading monomial of
284*p2 in that of p1
285*/
286static int pGetMaxPower (poly p1,poly p2)
287{
288  int     i,k,res = 32000; /*a very large integer*/
289
290  if (p1 == NULL) return 0;
291  for (i=1; i<=pVariables; i++)
292  {
293    if ( pGetExp(p2,i) != 0)
294    {
295      k =  pGetExp(p1,i) /  pGetExp(p2,i);
296      if (k < res) res = k;
297    }
298  }
299  return res;
300}
301
302/*2
303*Returns as i-th entry of P the coefficient of the (i-1) power of
304*the leading monomial of p2 in p1
305*/
306void pCancelPolyByMonom (poly p1,poly p2,polyset * P,int * SizeOfSet)
307{
308  int   maxPow;
309  poly  p,qp,Coeff;
310
311  if (*P == NULL)
312  {
313    *P = (polyset) omAlloc(5*sizeof(poly));
314    *SizeOfSet = 5;
315  }
316  p = pCopy(p1);
317  while (p != NULL)
318  {
319    qp = p->next;
320    p->next = NULL;
321    maxPow = pGetMaxPower(p,p2);
322    Coeff = pDivByMonom(p,p2);
323    if (maxPow > *SizeOfSet)
324    {
325      pEnlargeSet(P,*SizeOfSet,maxPow+1-*SizeOfSet);
326      *SizeOfSet = maxPow+1;
327    }
328    (*P)[maxPow] = pAdd((*P)[maxPow],Coeff);
329    pDelete(&p);
330    p = qp;
331  }
332}
333
334/*2
335*returns the leading monomial of p1 divided by the maximal power of that
336*of p2
337*/
338poly pDivByMonom (poly p1,poly p2)
339{
340  int     k, i;
341
342  if (p1 == NULL) return NULL;
343  k = pGetMaxPower(p1,p2);
344  if (k == 0)
345    return pHead(p1);
346  else
347  {
348    number n;
349    poly p = pInit();
350
351    p->next = NULL;
352    for (i=1; i<=pVariables; i++)
353    {
354       pSetExp(p,i, pGetExp(p1,i)-k* pGetExp(p2,i));
355    }
356    nPower(p2->coef,k,&n);
357    pSetCoeff0(p,nDiv(p1->coef,n));
358    nDelete(&n);
359    pSetm(p);
360    return p;
361  }
362}
363/*----------utilities for syzygies--------------*/
364poly pTakeOutComp(poly * p, int k)
365{
366  poly q = *p,qq=NULL,result = NULL;
367
368  if (q==NULL) return NULL;
369  if (pGetComp(q)==k)
370  {
371    result = q;
372    while ((q!=NULL) && (pGetComp(q)==k))
373    {
374      pSetComp(q,0);
375      pSetmComp(q);
376      qq = q;
377      pIter(q);
378    }
379    *p = q;
380    pNext(qq) = NULL;
381  }
382  if (q==NULL) return result;
383  if (pGetComp(q) > k)
384  {
385    pDecrComp(q);
386    pSetmComp(q);
387  }
388  poly pNext_q;
389  while ((pNext_q=pNext(q))!=NULL)
390  {
391    if (pGetComp(pNext_q)==k)
392    {
393      if (result==NULL)
394      {
395        result = pNext_q;
396        qq = result;
397      }
398      else
399      {
400        pNext(qq) = pNext_q;
401        pIter(qq);
402      }
403      pNext(q) = pNext(pNext_q);
404      pNext(qq) =NULL;
405      pSetComp(qq,0);
406      pSetmComp(qq);
407    }
408    else
409    {
410      /*pIter(q);*/ q=pNext_q;
411      if (pGetComp(q) > k)
412      {
413        pDecrComp(q);
414        pSetmComp(q);
415      }
416    }
417  }
418  return result;
419}
420
421// Splits *p into two polys: *q which consists of all monoms with
422// component == comp and *p of all other monoms *lq == pLength(*q)
423void pTakeOutComp(poly *r_p, Exponent_t comp, poly *r_q, int *lq)
424{
425  spolyrec pp, qq;
426  poly p, q, p_prev;
427  int l = 0;
428
429#ifdef HAVE_ASSUME
430  int lp = pLength(*r_p);
431#endif
432
433  pNext(&pp) = *r_p;
434  p = *r_p;
435  p_prev = &pp;
436  q = &qq;
437
438  while(p != NULL)
439  {
440    while (pGetComp(p) == comp)
441    {
442      pNext(q) = p;
443      pIter(q);
444      pSetComp(p, 0);
445      pSetmComp(p);
446      pIter(p);
447      l++;
448      if (p == NULL)
449      {
450        pNext(p_prev) = NULL;
451        goto Finish;
452      }
453    }
454    pNext(p_prev) = p;
455    p_prev = p;
456    pIter(p);
457  }
458
459  Finish:
460  pNext(q) = NULL;
461  *r_p = pNext(&pp);
462  *r_q = pNext(&qq);
463  *lq = l;
464#ifdef HAVE_ASSUME
465  assume(pLength(*r_p) + pLength(*r_q) == lp);
466#endif
467  pTest(*r_p);
468  pTest(*r_q);
469}
470
471void pDecrOrdTakeOutComp(poly *r_p, Exponent_t comp, Order_t order,
472                         poly *r_q, int *lq)
473{
474  spolyrec pp, qq;
475  poly p, q, p_prev;
476  int l = 0;
477
478  pNext(&pp) = *r_p;
479  p = *r_p;
480  p_prev = &pp;
481  q = &qq;
482
483#ifdef HAVE_ASSUME
484  if (p != NULL)
485  {
486    while (pNext(p) != NULL)
487    {
488      assume(pGetOrder(p) >= pGetOrder(pNext(p)));
489      pIter(p);
490    }
491  }
492  p = *r_p;
493#endif
494
495  while (p != NULL && pGetOrder(p) > order) pIter(p);
496
497  while(p != NULL && pGetOrder(p) == order)
498  {
499    while (pGetComp(p) == comp)
500    {
501      pNext(q) = p;
502      pIter(q);
503      pIter(p);
504      pSetComp(p, 0);
505      pSetmComp(p);
506      l++;
507      if (p == NULL || pGetOrder(p) != order)
508      {
509        pNext(p_prev) = p;
510        goto Finish;
511      }
512    }
513    pNext(p_prev) = p;
514    p_prev = p;
515    pIter(p);
516  }
517
518  Finish:
519  pNext(q) = NULL;
520  *r_p = pNext(&pp);
521  *r_q = pNext(&qq);
522  *lq = l;
523}
524
525#if 1
526poly pTakeOutComp1(poly * p, int k)
527{
528  poly q = *p;
529
530  if (q==NULL) return NULL;
531
532  poly qq=NULL,result = NULL;
533
534  if (pGetComp(q)==k)
535  {
536    result = q; /* *p */
537    while ((q!=NULL) && (pGetComp(q)==k))
538    {
539      pSetComp(q,0);
540      pSetmComp(q);
541      qq = q;
542      pIter(q);
543    }
544    *p = q;
545    pNext(qq) = NULL;
546  }
547  if (q==NULL) return result;
548//  if (pGetComp(q) > k) pGetComp(q)--;
549  while (pNext(q)!=NULL)
550  {
551    if (pGetComp(pNext(q))==k)
552    {
553      if (result==NULL)
554      {
555        result = pNext(q);
556        qq = result;
557      }
558      else
559      {
560        pNext(qq) = pNext(q);
561        pIter(qq);
562      }
563      pNext(q) = pNext(pNext(q));
564      pNext(qq) =NULL;
565      pSetComp(qq,0);
566      pSetmComp(qq);
567    }
568    else
569    {
570      pIter(q);
571//      if (pGetComp(q) > k) pGetComp(q)--;
572    }
573  }
574  return result;
575}
576#endif
577
578void pDeleteComp(poly * p,int k)
579{
580  poly q;
581
582  while ((*p!=NULL) && (pGetComp(*p)==k)) pDeleteLm(p);
583  if (*p==NULL) return;
584  q = *p;
585  if (pGetComp(q)>k)
586  {
587    pDecrComp(q);
588    pSetmComp(q);
589  }
590  while (pNext(q)!=NULL)
591  {
592    if (pGetComp(pNext(q))==k)
593      pDeleteLm(&(pNext(q)));
594    else
595    {
596      pIter(q);
597      if (pGetComp(q)>k)
598      {
599        pDecrComp(q);
600        pSetmComp(q);
601      }
602    }
603  }
604}
605/*----------end of utilities for syzygies--------------*/
606
607/*2
608* pair has no common factor ? or is no polynomial
609*/
610BOOLEAN pHasNotCF(poly p1, poly p2)
611{
612
613  if (pGetComp(p1) > 0 || pGetComp(p2) > 0)
614    return FALSE;
615  int i = 1;
616  loop
617  {
618    if ((pGetExp(p1, i) > 0) && (pGetExp(p2, i) > 0))   return FALSE;
619    if (i == pVariables)                                return TRUE;
620    i++;
621  }
622}
623
624
625/*2
626*divides p1 by its leading monomial
627*/
628void pNorm(poly p1)
629{
630  poly h;
631  number k, c;
632
633  if (p1!=NULL)
634  {
635    if (!nIsOne(pGetCoeff(p1)))
636    {
637      nNormalize(pGetCoeff(p1));
638      k=pGetCoeff(p1);
639      c = nInit(1);
640      pSetCoeff0(p1,c);
641      h = pNext(p1);
642      while (h!=NULL)
643      {
644        c=nDiv(pGetCoeff(h),k);
645        if (!nIsOne(c)) nNormalize(c);
646        pSetCoeff(h,c);
647        pIter(h);
648      }
649      nDelete(&k);
650    }
651    else
652    {
653      if (nNormalize != nDummy2)
654      {
655        h = pNext(p1);
656        while (h!=NULL)
657        {
658          nNormalize(pGetCoeff(h));
659          pIter(h);
660        }
661      }
662    }
663  }
664}
665
666/*2
667*normalize all coeffizients
668*/
669void pNormalize(poly p)
670{
671  if (rField_has_simple_inverse()) return; /* Z/p, GF(p,n), R, long R/C */
672  while (p!=NULL)
673  {
674    nTest(pGetCoeff(p));
675    nNormalize(pGetCoeff(p));
676    pIter(p);
677  }
678}
679
680// splits p into polys with Exp(n) == 0 and Exp(n) != 0
681// Poly with Exp(n) != 0 is reversed
682static void pSplitAndReversePoly(poly p, int n, poly *non_zero, poly *zero)
683{
684  if (p == NULL)
685  {
686    *non_zero = NULL;
687    *zero = NULL;
688    return;
689  }
690  spolyrec sz;
691  poly z, n_z, next;
692  z = &sz;
693  n_z = NULL;
694
695  while(p != NULL)
696  {
697    next = pNext(p);
698    if (pGetExp(p, n) == 0)
699    {
700      pNext(z) = p;
701      pIter(z);
702    }
703    else
704    {
705      pNext(p) = n_z;
706      n_z = p;
707    }
708    p = next;
709  }
710  pNext(z) = NULL;
711  *zero = pNext(&sz);
712  *non_zero = n_z;
713  return;
714}
715
716/*3
717* substitute the n-th variable by 1 in p
718* destroy p
719*/
720static poly pSubst1 (poly p,int n)
721{
722  poly qq,result = NULL;
723  poly zero, non_zero;
724
725  // reverse, so that add is likely to be linear
726  pSplitAndReversePoly(p, n, &non_zero, &zero);
727
728  while (non_zero != NULL)
729  {
730    assume(pGetExp(non_zero, n) != 0);
731    qq = non_zero;
732    pIter(non_zero);
733    qq->next = NULL;
734    pSetExp(qq,n,0);
735    pSetm(qq);
736    result = pAdd(result,qq);
737  }
738  p = pAdd(result, zero);
739  pTest(p);
740  return p;
741}
742
743/*3
744* substitute the n-th variable by number e in p
745* destroy p
746*/
747static poly pSubst2 (poly p,int n, number e)
748{
749  assume( ! nIsZero(e) );
750  poly qq,result = NULL;
751  number nn, nm;
752  poly zero, non_zero;
753
754  // reverse, so that add is likely to be linear
755  pSplitAndReversePoly(p, n, &non_zero, &zero);
756
757  while (non_zero != NULL)
758  {
759    assume(pGetExp(non_zero, n) != 0);
760    qq = non_zero;
761    pIter(non_zero);
762    qq->next = NULL;
763    nPower(e, pGetExp(qq, n), &nn);
764    nm = nMult(nn, pGetCoeff(qq));
765    pSetCoeff(qq, nm);
766    nDelete(&nn);
767    pSetExp(qq, n, 0);
768    pSetm(qq);
769    result = pAdd(result,qq);
770  }
771  p = pAdd(result, zero);
772  pTest(p);
773  return p;
774}
775
776
777/* delete monoms whose n-th exponent is different from zero */
778poly pSubst0(poly p, int n)
779{
780  spolyrec res;
781  poly h = &res;
782  pNext(h) = p;
783
784  while (pNext(h)!=NULL)
785  {
786    if (pGetExp(pNext(h),n)!=0)
787    {
788      pDeleteLm(&pNext(h));
789    }
790    else
791    {
792      pIter(h);
793    }
794  }
795  pTest(pNext(&res));
796  return pNext(&res);
797}
798
799/*2
800* substitute the n-th variable by e in p
801* destroy p
802*/
803poly pSubst(poly p, int n, poly e)
804{
805  if (e == NULL) return pSubst0(p, n);
806
807  if (pIsConstant(e))
808  {
809    if (nIsOne(pGetCoeff(e))) return pSubst1(p,n);
810    else return pSubst2(p, n, pGetCoeff(e));
811  }
812
813  int exponent,i;
814  poly h, res, m;
815  Exponent_t *me,*ee;
816  number nu,nu1;
817
818  me=(Exponent_t *)omAlloc((pVariables+1)*sizeof(Exponent_t));
819  ee=(Exponent_t *)omAlloc((pVariables+1)*sizeof(Exponent_t));
820  if (e!=NULL) pGetExpV(e,ee);
821  res=NULL;
822  h=p;
823  while (h!=NULL)
824  {
825    if ((e!=NULL) || (pGetExp(h,n)==0))
826    {
827      m=pHead(h);
828      pGetExpV(m,me);
829      exponent=me[n];
830      me[n]=0;
831      for(i=pVariables;i>0;i--)
832        me[i]+=exponent*ee[i];
833      pSetExpV(m,me);
834      if (e!=NULL)
835      {
836        nPower(pGetCoeff(e),exponent,&nu);
837        nu1=nMult(pGetCoeff(m),nu);
838        nDelete(&nu);
839        pSetCoeff(m,nu1);
840      }
841      res=pAdd(res,m);
842    }
843    pDeleteLm(&h);
844  }
845  omFreeSize((ADDRESS)me,(pVariables+1)*sizeof(Exponent_t));
846  omFreeSize((ADDRESS)ee,(pVariables+1)*sizeof(Exponent_t));
847  return res;
848}
849
850BOOLEAN pCompareChain (poly p,poly p1,poly p2,poly lcm)
851{
852  int k, j;
853
854  if (lcm==NULL) return FALSE;
855
856  for (j=pVariables; j; j--)
857    if ( pGetExp(p,j) >  pGetExp(lcm,j)) return FALSE;
858  if ( pGetComp(p) !=  pGetComp(lcm)) return FALSE;
859  for (j=pVariables; j; j--)
860  {
861    if (pGetExp(p1,j)!=pGetExp(lcm,j))
862    {
863      if (pGetExp(p,j)!=pGetExp(lcm,j))
864      {
865        for (k=pVariables; k>j; k--)
866        {
867          if ((pGetExp(p,k)!=pGetExp(lcm,k))
868          && (pGetExp(p2,k)!=pGetExp(lcm,k)))
869            return TRUE;
870        }
871        for (k=j-1; k; k--)
872        {
873          if ((pGetExp(p,k)!=pGetExp(lcm,k))
874          && (pGetExp(p2,k)!=pGetExp(lcm,k)))
875            return TRUE;
876        }
877        return FALSE;
878      }
879    }
880    else if (pGetExp(p2,j)!=pGetExp(lcm,j))
881    {
882      if (pGetExp(p,j)!=pGetExp(lcm,j))
883      {
884        for (k=pVariables; k>j; k--)
885        {
886          if ((pGetExp(p,k)!=pGetExp(lcm,k))
887          && (pGetExp(p1,k)!=pGetExp(lcm,k)))
888            return TRUE;
889        }
890        for (k=j-1; k!=0 ; k--)
891        {
892          if ((pGetExp(p,k)!=pGetExp(lcm,k))
893          && (pGetExp(p1,k)!=pGetExp(lcm,k)))
894            return TRUE;
895        }
896        return FALSE;
897      }
898    }
899  }
900  return FALSE;
901}
Note: See TracBrowser for help on using the repository browser.