Changeset 8a5c49 in git


Ignore:
Timestamp:
Aug 12, 2011, 2:07:54 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '52dcfddee5ec87d404d5e0fb44f2d627608208f1')
Children:
7fccc79116395e52484b519fc379d165d8cf6bc2
Parents:
95eb6d00149ac8549074f366eba29162578e4ead
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-08-12 14:07:54+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 13:21:27+01:00
Message:
fix ipassign.cc, extra.cc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipassign.cc

    r95eb6d r8a5c49  
    142142      ideal I=(ideal)IDDATA(h);
    143143      for(i=IDELEMS(I)-1;i>=0;i--)
    144               I->m[i]=p_MinPolyNormalize(I->m[i], currRing);
     144             I->m[i]=p_MinPolyNormalize(I->m[i], currRing);
    145145      break;
    146146    }
     
    161161static BOOLEAN jjMINPOLY(leftv res, leftv a)
    162162{
     163  if (getCoeffType(currRing->cf)!=n_transExt)
     164  {
     165      WerrorS("no minpoly allowed");
     166      return TRUE;
     167  }
    163168  number p=(number)a->CopyD(NUMBER_CMD);
    164169  if (nIsZero(p))
    165170  {
    166     currRing->minpoly=NULL;
    167     naMinimalPoly=NULL;
     171    WerrorS("cannot set minpoly to 0");
     172    return TRUE;
    168173  }
    169174  else
    170175  {
    171     if ((rPar(currRing)!=1)
    172       || (rField_is_GF(currRing)))
    173     {
    174       WerrorS("no minpoly allowed");
     176    // remove all object currently in the ring
     177    while(currRing->idroot!=NULL)
     178    {
     179      killhdl2(currRing->idroot,&(currRing->idroot),currRing);
     180    }
     181    nNormalize(p);
     182    typedef struct { ring r; ideal i; } AlgExtInfo;
     183    struct fractionObject
     184    {
     185      poly numerator;
     186      poly denominator;
     187      int complexity;
     188    };
     189    typedef struct fractionObject * fraction;
     190
     191    AlgExtInfo A;
     192    A.r=currRing->cf->extRing;
     193    A.r->ref++;
     194    A.i=idInit(1,1);
     195    A.i->m[0]=((fraction)p)->numerator;
     196    ((fraction)p)->numerator=NULL;
     197    n_Delete(&p,currRing->cf);
     198    coeffs new_cf=nInitChar(n_algExt,&A);
     199    if (new_cf==NULL)
     200    {
     201      Werror("llegal minpoly");
     202      // cleanup A: TODO
    175203      return TRUE;
    176204    }
    177     if (currRing->minpoly!=NULL)
    178     {
    179       WerrorS("minpoly already set");
    180       return TRUE;
    181     }
    182     nNormalize(p);
    183     currRing->minpoly=p;
    184     naMinimalPoly=((lnumber)currRing->minpoly)->z;
    185     if (p_GetExp(((lnumber)currRing->minpoly)->z,1,currRing->extRing)==0)
    186     {
    187       Werror("minpoly must not be constant");
    188       currRing->minpoly=NULL;
    189       naMinimalPoly=NULL;
    190       nDelete(&p);
    191     }
    192     /* redefine function pointers due to switch from
    193        transcendental to algebraic field extension */
    194     //redefineFunctionPointers();
    195     // and now, normalize all already defined objects in this ring
    196     idhdl h=currRing->idroot;
    197     while(h!=NULL)
    198     {
    199       jjMINPOLY_red(h);
    200       h=IDNEXT(h);
     205    else
     206    {
     207      nKillChar(currRing->cf);
     208      currRing->cf=new_cf;
    201209    }
    202210  }
     
    300308{
    301309  number p=(number)a->CopyD(BIGINT_CMD);
    302   if (res->data!=NULL) nlDelete((number *)&res->data,NULL);
     310  if (res->data!=NULL) n_Delete((number *)&res->data,coeffs_BIGINT);
    303311  res->data=(void *)p;
    304312  jiAssignAttr(res,a);
     
    10541062      {
    10551063        Warn("expression list length(%d) does not match intmat size(%d)",
    1056               iv->length()+exprlist_length(hh),iv->length());
     1064             iv->length()+exprlist_length(hh),iv->length());
    10571065      }
    10581066      break;
  • Singular/table.h

    r95eb6d r8a5c49  
    11961196,{D(jjCOLMAX),     VCOLMAX,        INT_CMD }
    11971197,{D(jjTIMER),      VTIMER,         INT_CMD }
     1198#ifdef HAVE_GETTIMEOFDAY
    11981199,{D(jjRTIMER),     VRTIMER,        INT_CMD }
     1200#endif
    11991201,{D(jjMAXDEG),     VMAXDEG,        INT_CMD }
    12001202,{D(jjMAXMULT),    VMAXMULT,       INT_CMD }
  • kernel/mod2.h

    r95eb6d r8a5c49  
    2424 ******************************************************************/
    2525
     26/*defines, which should be set by configure */
     27#define HAVE_GETTIMEOFDAY 1
     28#define TIME_WITH_SYS_TIME 1
     29#define HAVE_SYS_TIME_H 1
    2630/* Default value for timer resolution in ticks per second */
    2731/* set to 10 for resolution of tenth of a second, etc */
  • libpolys/coeffs/coeffs.h

    r95eb6d r8a5c49  
    336336/// !!! Recommendation: remove implementations for unordered fields
    337337/// !!!                 and raise errors instead, in these cases
     338/// !!! Do not follow this recommendation: while writing polys,
     339/// !!! between 2 monomials will be an additional + iff !n_GreaterZero(next coeff)
     340///
    338341static inline BOOLEAN n_GreaterZero(number n, const coeffs r)
    339342{
Note: See TracChangeset for help on using the changeset viewer.