Changeset 8fa1c2 in git
- Timestamp:
- Jan 30, 2007, 10:30:16 AM (16 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 39c40f9402956fa6907f5f3f869d9402506f6a9b
- Parents:
- e014ab39e9c9d69c1d418be693f8a61dbe474598
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/longalg.cc
re014ab r8fa1c2 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: longalg.cc,v 1.2 0 2007-01-29 16:57:59Singular Exp $ */4 /* $Id: longalg.cc,v 1.21 2007-01-30 09:30:16 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: algebraic numbers … … 1050 1050 lnumber a = (lnumber)la; 1051 1051 lnumber b = (lnumber)lb; 1052 if (a->n !=NULL) naNormalize(la);1053 if (b->n !=NULL) naNormalize(lb);1054 1055 1052 1056 1053 omCheckAddrSize(a,sizeof(snumber)); … … 1156 1153 napDelete(&x); 1157 1154 lo->n = x; 1158 lo->s = 0;1159 1155 if(lo->z==NULL) 1160 1156 { … … 1165 1161 else if (lo->n!=NULL) 1166 1162 { 1163 lo->s = 0; 1167 1164 number luu=(number)lo; 1168 1165 naNormalize(luu); … … 1170 1167 } 1171 1168 else 1172 lo->s= 2;1169 lo->s=3; 1173 1170 #endif 1174 1171 naTest((number)lo); … … 1255 1252 if ((napIsConstant(x)) && nacIsOne(napGetCoeff(x))) 1256 1253 napDelete(&x); 1257 lo->s = 0;1258 1254 lo->n = x; 1259 1255 if (lo->n!=NULL) 1260 1256 { 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; 1265 1264 naTest((number)lo); 1266 1265 return (number)lo; … … 1662 1661 * univariate polynomials, always use Factory 1663 1662 */ 1663 //#define FACTORY_GCD_TEST 1664 1664 void naNormalize(number &pp) 1665 1665 { … … 1709 1709 } 1710 1710 y = p->n; 1711 }1712 1711 // p->n !=NULL: 1713 1712 /* collect all denoms from y and multiply x and y by it */ 1714 if (naIsChar0)1715 {1716 1713 number n=napLcm(y); 1717 1714 napMultN(x,n); … … 1731 1728 y = p->n; 1732 1729 } 1733 if ( naMinimalPoly == NULL)1730 if ((naMinimalPoly == NULL) && (x!=NULL) && (y!=NULL)) 1734 1731 { 1735 1732 int i;
Note: See TracChangeset
for help on using the changeset viewer.