Changeset 5589c0 in git
- Timestamp:
- Mar 22, 2001, 8:11:09 PM (22 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 8d00695ab431dc1599790b2d6e83c18c4b67069c
- Parents:
- ec7299504b1d2ac3aec79da0344f1272b0c51265
- Location:
- Singular
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/eigenval.cc
rec7299 r5589c0 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: eigenval.cc,v 1. 2 2001-03-14 10:25:11 mschulzeExp $ */4 /* $Id: eigenval.cc,v 1.3 2001-03-22 19:10:59 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: eigenvalues of constant square matrices … … 211 211 poly pp=p; 212 212 while(pp!=NULL&&pGetExp(pp,1)<=1) 213 213 { 214 214 if(pGetExp(pp,1)==0) 215 215 p0=pp; … … 218 218 p1=pp; 219 219 pp=pNext(pp); 220 220 } 221 221 if(pp==NULL) 222 223 222 { 223 pp=p; 224 224 p=pNSet(nNeg(nDiv(nCopy(pGetCoeff(p0)),nCopy(pGetCoeff(p1))))); 225 225 pDelete(&pp); 226 226 } 227 227 else 228 228 { 229 229 p=pMult_nn(p,pGetCoeff(e0->m[0])); 230 230 } 231 231 l=addval(l,p,(*m0)[i]); 232 232 } … … 263 263 { 264 264 WerrorS("square matrix expected"); 265 } 265 } 266 266 res->rtyp=LIST_CMD; 267 267 res->data=(void*)eigenval(mpCopy(M)); -
Singular/gnumpc.cc
rec7299 r5589c0 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: gnumpc.cc,v 1. 19 2001-01-30 11:45:47 pohlExp $ */4 /* $Id: gnumpc.cc,v 1.20 2001-03-22 19:10:59 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: computations with GMP complex floating-point numbers … … 143 143 */ 144 144 number ngcCopy(number a) 145 { 146 gmp_complex* b= NULL; 147 if ( a != NULL ) 148 { 149 b= new gmp_complex( *(gmp_complex*)a ); 150 } 151 return (number)b; 152 } 153 number ngc_Copy(number a, ring r) 145 154 { 146 155 gmp_complex* b= NULL; -
Singular/gnumpc.h
rec7299 r5589c0 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: gnumpc.h,v 1. 9 2001-01-18 16:53:55Singular Exp $ */6 /* $Id: gnumpc.h,v 1.10 2001-03-22 19:11:00 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT: computations with GMP floating-point numbers … … 28 28 void ngcPower(number x, int exp, number *lu); 29 29 number ngcCopy(number a); 30 number ngc_Copy(number a, ring r); 30 31 char * ngcRead (char *s, number *a); 31 32 void ngcWrite(number &a); -
Singular/gnumpfl.cc
rec7299 r5589c0 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: gnumpfl.cc,v 1.2 0 2001-01-30 11:45:47 pohlExp $ */4 /* $Id: gnumpfl.cc,v 1.21 2001-03-22 19:11:01 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: computations with GMP floating-point numbers … … 137 137 */ 138 138 number ngfCopy(number a) 139 { 140 gmp_float* b= NULL; 141 if ( a != NULL ) 142 { 143 b= new gmp_float( *(gmp_float*)a ); 144 } 145 return (number)b; 146 } 147 148 number ngf_Copy(number a, ring r) 139 149 { 140 150 gmp_float* b= NULL; -
Singular/gnumpfl.h
rec7299 r5589c0 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: gnumpfl.h,v 1.1 0 2001-01-18 16:53:56Singular Exp $ */6 /* $Id: gnumpfl.h,v 1.11 2001-03-22 19:11:03 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT: computations with GMP floating-point numbers … … 27 27 void ngfPower(number x, int exp, number *lu); 28 28 number ngfCopy(number a); 29 number ngf_Copy(number a, ring r); 29 30 char * ngfRead (char *s, number *a); 30 31 void ngfWrite(number &a); -
Singular/grammar.y
rec7299 r5589c0 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: grammar.y,v 1.8 7 2000-12-06 11:03:10Singular Exp $ */4 /* $Id: grammar.y,v 1.88 2001-03-22 19:11:03 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: SINGULAR shell grammatik … … 1088 1088 { 1089 1089 #ifdef HAVE_NAMESPACES 1090 if ( $4.Typ()==PACKAGE_CMD) {1091 if (iiExport(&$2,0,(idhdl)$4.data))1092 1093 } 1094 else1090 if (($4.Typ()==PACKAGE_CMD) 1091 && (iiExport(&$2,0,(idhdl)$4.data))) 1092 YYERROR; 1093 #else 1094 printf("String: %s;\n", (char *)$4.data); 1095 1095 #endif /* HAVE_NAMESPACES */ 1096 {1097 printf("String: %s;\n", (char *)$4.data);1098 }1099 1096 } 1100 1097 } -
Singular/ipshell.cc
rec7299 r5589c0 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipshell.cc,v 1.6 3 2001-02-09 14:22:56Singular Exp $ */4 /* $Id: ipshell.cc,v 1.64 2001-03-22 19:11:04 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: … … 862 862 //if(name->req_packhdl != NULL /*&& !isring*/) { 863 863 if(name->req_packhdl != NULL && !isring && 864 IDPACKAGE(name->req_packhdl) != root) {864 IDPACKAGE(name->req_packhdl)->idroot != (*root)) { 865 865 //Print("iiDeclCommand: PUSH(%s)\n",IDID(name->req_packhdl)); 866 866 namespaceroot->push( IDPACKAGE(name->req_packhdl) , -
Singular/libparse.l
rec7299 r5589c0 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 /* $Id: libparse.l,v 1.4 4 2000-12-19 18:31:43 obachmanExp $ */5 /* $Id: libparse.l,v 1.45 2001-03-22 19:11:05 Singular Exp $ */ 6 6 #include <stdio.h> 7 7 #include <string.h> … … 297 297 printf("Version:%s;\n", libnamebuf); 298 298 #else 299 #ifdef HAVE_NAMESPACES300 h0 = enterid( omStrDup("version"), myynest, STRING_CMD,301 &IDPACKAGE(pl)->idroot, FALSE );302 if (h0!=NULL)303 {304 IDSTRING(h0) = omStrDup(libnamebuf);305 }306 #else /* HAVE_NAMESPACES */299 //#ifdef HAVE_NAMESPACES 300 //h0 = enterid( omStrDup("version"), myynest, STRING_CMD, 301 // &IDPACKAGE(pl)->idroot, FALSE ); 302 //if (h0!=NULL) 303 //{ 304 // IDSTRING(h0) = omStrDup(libnamebuf); 305 //} 306 //#else /* HAVE_NAMESPACES */ 307 307 if (text_buffer!=NULL) omFree((ADDRESS)text_buffer); 308 308 text_buffer = omStrDup(libnamebuf); 309 309 omMarkAsStaticAddr(text_buffer); 310 #endif /* HAVE_NAMESPACES */310 //#endif /* HAVE_NAMESPACES */ 311 311 #endif 312 312 } -
Singular/longalg.cc
rec7299 r5589c0 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: longalg.cc,v 1. 59 2001-02-20 09:45:44Singular Exp $ */4 /* $Id: longalg.cc,v 1.60 2001-03-22 19:11:05 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: algebraic numbers … … 197 197 #define napDelete1(p) p_LmDelete((poly *)p, currRing->algring) 198 198 #define napCopy(p) (napoly)p_Copy((poly)p,currRing->algring) 199 #define nap_Copy(p,r) (napoly)p_Copy((poly)p,r->algring) 199 200 #define napComp(p,q) p_LmCmp((poly)p,(poly)q, currRing->algring) 200 201 #define napMultT(A,E) A=(napoly)p_Mult_mm((poly)A,(poly)E,currRing->algring) … … 1377 1378 erg->z = napCopy(src->z); 1378 1379 erg->n = napCopy(src->n); 1380 erg->s = src->s; 1381 return (number)erg; 1382 } 1383 number na_Copy(number p, ring r) 1384 { 1385 if (p==NULL) return NULL; 1386 lnumber erg; 1387 lnumber src = (lnumber)p; 1388 erg = (lnumber)omAlloc0Bin(rnumber_bin); 1389 erg->z = nap_Copy(src->z,r); 1390 erg->n = nap_Copy(src->n,r); 1379 1391 erg->s = src->s; 1380 1392 return (number)erg; -
Singular/longalg.h
rec7299 r5589c0 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: longalg.h,v 1.2 6 2001-01-20 11:39:14Singular Exp $ */6 /* $Id: longalg.h,v 1.27 2001-03-22 19:11:06 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT: algebraic numbers … … 69 69 BOOLEAN naGreaterZero(number a); 70 70 number naCopy(number p); /* erg:= p */ 71 number na_Copy(number p, ring r); /* erg:= p */ 71 72 number naAdd(number la, number li); /* lu := la+li */ 72 73 number naMult(number la, number li); /* lo := la*li */ -
Singular/longrat.cc
rec7299 r5589c0 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: longrat.cc,v 1.3 7 2001-01-18 16:53:54Singular Exp $ */4 /* $Id: longrat.cc,v 1.38 2001-03-22 19:11:06 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: computation with long rational numbers (Hubert Grassmann) … … 2266 2266 } 2267 2267 2268 LINLINE number nl_Copy(number a, ring r) 2269 { 2270 if ((SR_HDL(a) & SR_INT)||(a==NULL)) 2271 { 2272 return a; 2273 } 2274 return _nlCopy_NoImm(a); 2275 } 2276 2268 2277 2269 2278 LINLINE void nlNew (number * r) -
Singular/longrat.h
rec7299 r5589c0 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: longrat.h,v 1.2 2 2001-01-18 16:53:54Singular Exp $ */6 /* $Id: longrat.h,v 1.23 2001-03-22 19:11:07 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT: computation with long rational numbers … … 41 41 struct snumber; 42 42 typedef struct snumber rnumber; 43 typedef rnumber * number;44 43 struct snumber 45 44 { … … 66 65 LINLINE BOOLEAN nlIsZero(number za); 67 66 LINLINE number nlCopy(number a); 67 LINLINE number nl_Copy(number a, ring r); 68 68 LINLINE void nlNew(number *r); 69 69 LINLINE void nlDelete(number *a, const ring r); -
Singular/numbers.cc
rec7299 r5589c0 2 2 * Computer Algebra System SINGULAR * 3 3 *****************************************/ 4 /* $Id: numbers.cc,v 1.4 0 2001-02-20 09:45:43Singular Exp $ */4 /* $Id: numbers.cc,v 1.41 2001-03-22 19:11:07 Singular Exp $ */ 5 5 6 6 /* … … 90 90 91 91 number ndCopy(number a) { return a; } 92 number nd_Copy(number a, ring r) { return a; } 92 93 93 94 /*2 … … 223 224 r->cf->cfDelete= ndDelete; 224 225 r->cf->nNew=nDummy1; 226 r->cf->nCopy = ndCopy; 227 r->cf->cfCopy = nd_Copy; 225 228 if (rField_is_Extension(r)) 226 229 { … … 243 246 r->cf->nInvers = naInvers; 244 247 r->cf->nCopy = naCopy; 248 r->cf->cfCopy = na_Copy; 245 249 r->cf->nGreater = naGreater; 246 250 r->cf->nEqual = naEqual; … … 279 283 r->cf->nInvers= nlInvers; 280 284 r->cf->nCopy = nlCopy; 285 r->cf->cfCopy = nl_Copy; 281 286 r->cf->nGreater = nlGreater; 282 287 r->cf->nEqual = nlEqual; … … 313 318 r->cf->nNeg = npNeg; 314 319 r->cf->nInvers= npInvers; 315 r->cf->nCopy = ndCopy;316 320 r->cf->nGreater = npGreater; 317 321 r->cf->nEqual = npEqual; … … 350 354 r->cf->nNeg = nfNeg; 351 355 r->cf->nInvers= nfInvers; 352 r->cf->nCopy = ndCopy;353 356 r->cf->nGreater = nfGreater; 354 357 r->cf->nEqual = nfEqual; … … 385 388 r->cf->nNeg = nrNeg; 386 389 r->cf->nInvers= nrInvers; 387 r->cf->nCopy = ndCopy;388 390 r->cf->nGreater = nrGreater; 389 391 r->cf->nEqual = nrEqual; … … 422 424 r->cf->nInvers= ngfInvers; 423 425 r->cf->nCopy = ngfCopy; 426 r->cf->cfCopy = ngf_Copy; 424 427 r->cf->nGreater = ngfGreater; 425 428 r->cf->nEqual = ngfEqual; … … 458 461 r->cf->nInvers= ngcInvers; 459 462 r->cf->nCopy = ngcCopy; 463 r->cf->cfCopy = ngc_Copy; 460 464 r->cf->nGreater = ngcGreater; 461 465 r->cf->nEqual = ngcEqual; -
Singular/numbers.h
rec7299 r5589c0 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: numbers.h,v 1.2 6 2001-02-20 09:45:44Singular Exp $ */6 /* $Id: numbers.h,v 1.27 2001-03-22 19:11:08 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT: interface to coefficient aritmetics … … 10 10 #include "structs.h" 11 11 12 #define n_Copy(n, r) (r)->cf-> nCopy(n)12 #define n_Copy(n, r) (r)->cf->cfCopy(n,r) 13 13 #define n_Delete(n, r) (r)->cf->cfDelete(n,r) 14 14 #define n_Mult(n1, n2, r) (r)->cf->nMult(n1, n2) … … 72 72 number ndGcd(number a, number b); 73 73 number ndCopy(number a); 74 number nd_Copy(number a, ring r); 74 75 75 76 #ifdef LDEBUG -
Singular/p_Numbers.h
rec7299 r5589c0 7 7 * Author: obachman (Olaf Bachmann) 8 8 * Created: 8/00 9 * Version: $Id: p_Numbers.h,v 1. 6 2001-01-09 15:40:12Singular Exp $9 * Version: $Id: p_Numbers.h,v 1.7 2001-03-22 19:11:08 Singular Exp $ 10 10 *******************************************************************/ 11 11 #ifndef P_NUMBERS_H … … 13 13 14 14 #include "numbers.h" 15 #define n_Copy_FieldGeneral(n, r) (r)->cf-> nCopy(n)15 #define n_Copy_FieldGeneral(n, r) (r)->cf->cfCopy(n,r) 16 16 #define n_Delete_FieldGeneral(n, r) (r)->cf->cfDelete(n,r) 17 17 #define n_Mult_FieldGeneral(n1, n2, r) (r)->cf->nMult(n1, n2) -
Singular/structs.h
rec7299 r5589c0 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: structs.h,v 1.5 8 2001-02-26 15:08:45 levandovExp $ */6 /* $Id: structs.h,v 1.59 2001-03-22 19:11:08 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 234 234 number (*nInvers)(number a); 235 235 number (*nCopy)(number a); 236 number (*cfCopy)(number a, ring r); 236 237 number (*nRePart)(number a); 237 238 number (*nImPart)(number a); -
Singular/subexpr.cc
rec7299 r5589c0 5 5 * ABSTRACT: handling of leftv 6 6 */ 7 /* $Id: subexpr.cc,v 1.7 2 2001-02-09 14:22:57Singular Exp $ */7 /* $Id: subexpr.cc,v 1.73 2001-03-22 19:11:09 Singular Exp $ */ 8 8 9 9 #include <stdlib.h> … … 1655 1655 #ifdef HAVE_NAMESPACES 1656 1656 char *name; 1657 if(v->packhdl != NULL) { 1657 if((v->packhdl != NULL)&&(IDPACKAGE(v->packhdl)!=namespaceroot->pack)) 1658 { 1659 // MEMORY LEAK ?? 1658 1660 name = (char *)omAlloc(strlen(v->name) + strlen(IDID(v->packhdl)) + 3); 1659 1661 sprintf(name, "%s::%s", IDID(v->packhdl), v->name);
Note: See TracChangeset
for help on using the changeset viewer.