Changeset cf5fc11 in git
 Timestamp:
 Jan 27, 2005, 5:44:13 PM (18 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
 Children:
 e21afbaa54be68a2741df57da6a4156aba4b81d7
 Parents:
 c95632f6751087d2f62be544ec7e07d86913a78a
 Location:
 kernel
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

kernel/polys.h
rc95632f rcf5fc11 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: polys.h,v 1. 2 20040423 13:56:40Singular Exp $ */6 /* $Id: polys.h,v 1.3 20050127 16:42:15 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT  all basic methods to manipulate polynomials of the … … 360 360 void pSimpleContent(poly p, int s); 361 361 void pCleardenom(poly p); 362 void pCleardenom_n(poly p,number &c); 362 363 void p_Normalize(poly p, ring r); 363 364 #define pNormalize(p) p_Normalize(p,currRing) 
kernel/polys1.cc
rc95632f rcf5fc11 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys1.cc,v 1. 6 20040827 12:22:34Singular Exp $ */4 /* $Id: polys1.cc,v 1.7 20050127 16:44:13 Singular Exp $ */ 5 5 6 6 /* … … 921 921 } 922 922 923 void pCleardenom_n(poly ph,number &c) 924 { 925 number d, h; 926 poly p; 927 928 p = ph; 929 if(pNext(p)==NULL) 930 { 931 c=nInvers(pGetCoeff(p)); 932 pSetCoeff(p,nInit(1)); 933 } 934 else 935 { 936 h = nInit(1); 937 while (p!=NULL) 938 { 939 nNormalize(pGetCoeff(p)); 940 d=nLcm(h,pGetCoeff(p),currRing); 941 nDelete(&h); 942 h=d; 943 pIter(p); 944 } 945 c=h; 946 /* contains the 1/lcm of all denominators */ 947 if(!nIsOne(h)) 948 { 949 p = ph; 950 while (p!=NULL) 951 { 952 /* should be: 953 * number hh; 954 * nGetDenom(p>coef,&hh); 955 * nMult(&h,&hh,&d); 956 * nNormalize(d); 957 * nDelete(&hh); 958 * nMult(d,p>coef,&hh); 959 * nDelete(&d); 960 * nDelete(&(p>coef)); 961 * p>coef =hh; 962 */ 963 d=nMult(h,pGetCoeff(p)); 964 nNormalize(d); 965 pSetCoeff(p,d); 966 pIter(p); 967 } 968 if (nGetChar()==1) 969 { 970 loop 971 { 972 h = nInit(1); 973 p=ph; 974 while (p!=NULL) 975 { 976 d=nLcm(h,pGetCoeff(p),currRing); 977 nDelete(&h); 978 h=d; 979 pIter(p); 980 } 981 /* contains the 1/lcm of all denominators */ 982 if(!nIsOne(h)) 983 { 984 p = ph; 985 while (p!=NULL) 986 { 987 /* should be: 988 * number hh; 989 * nGetDenom(p>coef,&hh); 990 * nMult(&h,&hh,&d); 991 * nNormalize(d); 992 * nDelete(&hh); 993 * nMult(d,p>coef,&hh); 994 * nDelete(&d); 995 * nDelete(&(p>coef)); 996 * p>coef =hh; 997 */ 998 d=nMult(h,pGetCoeff(p)); 999 nNormalize(d); 1000 pSetCoeff(p,d); 1001 pIter(p); 1002 } 1003 number t=nMult(c,h); 1004 nDelete(&c); 1005 c=t; 1006 } 1007 else 1008 { 1009 break; 1010 } 1011 nDelete(&h); 1012 } 1013 } 1014 } 1015 } 1016 } 1017 923 1018 /*2 924 1019 *tests if p is homogeneous with respect to the actual weigths
Note: See TracChangeset
for help on using the changeset viewer.