Changeset ce7a6ad in git


Ignore:
Timestamp:
Jan 20, 2002, 10:20:19 AM (22 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b8490e74a539f406ed4238becdea28121774e338
Parents:
959ad237d1cd4759153762c28484900baf52ec96
Message:
*hannes: port of 2-0 changes


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

Legend:

Unmodified
Added
Removed
  • Singular/clapsing.cc

    r959ad23 rce7a6ad  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 // $Id: clapsing.cc,v 1.78 2001-08-27 14:46:49 Singular Exp $
     5// $Id: clapsing.cc,v 1.79 2002-01-20 09:20:19 Singular Exp $
    66/*
    77* ABSTRACT: interface between Singular and factory
     
    2323#ifdef HAVE_LIBFAC_P
    2424#include <factor.h>
     25CanonicalForm algcd(const CanonicalForm & F, const CanonicalForm & g, const CFList & as, const Varlist & order);
     26
    2527#endif
    2628#include "ring.h"
     
    206208  if (f==NULL) return pCopy(g); // f==0 => gcd=g (but do a pCleardenom)
    207209
     210  if (pIsConstant(f) || pIsConstant(g)) return pOne();
     211
    208212  // for now there is only the possibility to handle polynomials over
    209213  // Q and Fp ...
     
    226230      if ( nGetChar()==1 ) /* Q(a) */
    227231      {
    228         WerrorS( feNotImplemented );
     232      //  WerrorS( feNotImplemented );
     233        CanonicalForm mipo=convSingTrClapP(((lnumber)currRing->minpoly)->z);
     234        Varlist ord;
     235        ord.append(mipo.mvar());
     236        CFList as(mipo);
     237        Variable a=rootOf(mipo);
     238        CanonicalForm F( convSingAPClapAP( f,a ) ), G( convSingAPClapAP( g,a ) );
     239        res= convClapAPSingAP( algcd( F, G, as, ord) );
    229240      }
    230241      else
     
    10461057  loop
    10471058  {
     1059    BOOLEAN done=TRUE;
    10481060    i=Li.getItem()-1;
    10491061    mark[i]=1;
    10501062    if (i<offs)
    10511063    {
    1052       StringAppendS(currRing->parameter[i]);
     1064      done=FALSE;
     1065      //StringAppendS(currRing->parameter[i]);
    10531066    }
    10541067    else
     
    10591072    cnt--;
    10601073    if(cnt==0) break;
    1061     StringAppendS(",");
     1074    if (done) StringAppendS(",");
    10621075    if(! Li.hasItem()) break;
    10631076  }
    10641077  for(i=0;i<pVariables+offs;i++)
    10651078  {
     1079    BOOLEAN done=TRUE;
    10661080    if(mark[i]==0)
    10671081    {
    10681082      if (i<offs)
    10691083      {
    1070         StringAppendS(currRing->parameter[i]);
     1084        done=FALSE;
     1085        //StringAppendS(currRing->parameter[i]);
    10711086      }
    10721087      else
     
    10761091      cnt--;
    10771092      if(cnt==0) break;
    1078       StringAppendS(",");
    1079     }
    1080   }
    1081   return omStrDup(StringAppendS(""));
     1093      if (done) StringAppendS(",");
     1094    }
     1095  }
     1096  char * s=omStrDup(StringAppendS(""));
     1097  if (s[strlen(s)-1]==',') s[strlen(s)-1]='\0';
     1098  return s;
    10821099#else
    10831100  return NULL;
Note: See TracChangeset for help on using the changeset viewer.