Changeset 8fa1c2 in git


Ignore:
Timestamp:
Jan 30, 2007, 10:30:16 AM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
39c40f9402956fa6907f5f3f869d9402506f6a9b
Parents:
e014ab39e9c9d69c1d418be693f8a61dbe474598
Message:
*hannes: optim, ->s


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

Legend:

Unmodified
Added
Removed
  • kernel/longalg.cc

    re014ab r8fa1c2  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: longalg.cc,v 1.20 2007-01-29 16:57:59 Singular Exp $ */
     4/* $Id: longalg.cc,v 1.21 2007-01-30 09:30:16 Singular Exp $ */
    55/*
    66* ABSTRACT:   algebraic numbers
     
    10501050  lnumber a = (lnumber)la;
    10511051  lnumber b = (lnumber)lb;
    1052   if (a->n !=NULL) naNormalize(la);
    1053   if (b->n !=NULL) naNormalize(lb);
    1054 
    10551052
    10561053  omCheckAddrSize(a,sizeof(snumber));
     
    11561153    napDelete(&x);
    11571154  lo->n = x;
    1158   lo->s = 0;
    11591155  if(lo->z==NULL)
    11601156  {
     
    11651161  else if (lo->n!=NULL)
    11661162  {
     1163    lo->s = 0;
    11671164    number luu=(number)lo;
    11681165    naNormalize(luu);
     
    11701167  }
    11711168  else
    1172     lo->s=2;
     1169    lo->s=3;
    11731170#endif
    11741171  naTest((number)lo);
     
    12551252  if ((napIsConstant(x)) && nacIsOne(napGetCoeff(x)))
    12561253    napDelete(&x);
    1257   lo->s = 0;
    12581254  lo->n = x;
    12591255  if (lo->n!=NULL)
    12601256  {
    1261      number luu=(number)lo;
    1262      naNormalize(luu);
    1263      lo=(lnumber)luu;
    1264   }
     1257    lo->s = 0;
     1258    number luu=(number)lo;
     1259    naNormalize(luu);
     1260    lo=(lnumber)luu;
     1261  }
     1262  else
     1263    lo->s=3;
    12651264  naTest((number)lo);
    12661265  return (number)lo;
     
    16621661*   univariate polynomials, always use Factory
    16631662*/
     1663//#define FACTORY_GCD_TEST
    16641664void naNormalize(number &pp)
    16651665{
     
    17091709    }
    17101710    y = p->n;
    1711   }
    17121711  // p->n !=NULL:
    17131712  /* collect all denoms from y and multiply x and y by it */
    1714   if (naIsChar0)
    1715   {
    17161713    number n=napLcm(y);
    17171714    napMultN(x,n);
     
    17311728    y = p->n;
    17321729  }
    1733   if (naMinimalPoly == NULL)
     1730  if ((naMinimalPoly == NULL) && (x!=NULL) && (y!=NULL))
    17341731  {
    17351732    int i;
Note: See TracChangeset for help on using the changeset viewer.