Changeset df3483a in git for Singular/spSpolyLoop.pl
- Timestamp:
- Apr 30, 1998, 5:27:25 PM (26 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 24189c4982473a71947501ca9125a109ab40e937
- Parents:
- 1d142c32d3b504db8d82f4aa3104fb6643914101
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/spSpolyLoop.pl
r1d142c rdf3483a 1 1 #!/usr/local/bin/perl 2 2 ########################################################################### 3 # $Id: spSpolyLoop.pl,v 1. 6 1998-04-06 17:59:36obachman Exp $3 # $Id: spSpolyLoop.pl,v 1.7 1998-04-30 15:27:25 obachman Exp $ 4 4 5 5 ########################################################################### … … 250 250 { 251 251 poly a = monom, // collects the result 252 b = pNew(),// stores a1*monom252 b = NULL, // stores a1*monom 253 253 c; // used for temporary storage 254 254 number tm = pGetCoeff(monom), // coefficient of monom … … 258 258 259 259 if (a2==NULL) goto Finish; // we are done if a2 is 0 260 b = pNew(); 260 261 261 262 CALL_INITORDER(order, a2); // inits order for homog case … … 306 307 a = pNext(a) = b; // append b to result and advance a1 307 308 pIter(a1); 309 if (a1 == NULL) // are we done? 310 { 311 b = pNew(); 312 goto Finish; 313 } 308 314 b = pNew(); 309 if (a1 == NULL) goto Finish; // are we done?310 315 CALL_PCOPYADDFAST(b, a1, monom, order); // No! So, update b = a1*monom 311 316 goto Top; … … 319 324 CALL_MULTCOPYX(a1, monom, a, tneg, spNoether); 320 325 CALL_NDELETE("&tneg"); 321 pFree1(b);326 if (b != NULL) pFree1(b); 322 327 } 323 328 … … 427 432 $res = $res."NonZeroTestA($d, pOrdSgn, goto NotEqual);\n"; 428 433 } 429 $nw = &GetNumWords($argv); 430 $rargv = $rargv."_".$nw; 431 $res = join("_", $res, pMonComp, $ot, $nw); 432 if ($nw eq "nwONE" || $nw eq "nwTWO") 433 { 434 $res = $res."($p1, $p2, $d, NonZeroA($d, pLexSgn, goto NotEqual ), goto Equal);" 435 } 436 else 437 { 438 $res = $res."($p1, $p2, pVariables1W, $d, NonZeroA($d, pLexSgn, goto NotEqual ), goto Equal);"; 439 } 434 # $rargv = $rargv."_nwGEN"; 435 # $res = join("_", $res, pMonComp, $ot, "nwGEN"); 436 # $res = $res."($p1, $p2, pVariables1W, $d, NonZeroA($d, pLexSgn, goto NotEqual ), goto Equal);"; 437 $nw = &GetNumWords($argv); 438 $rargv = $rargv."_".$nw; 439 $res = join("_", $res, pMonComp, $ot, $nw); 440 if ($nw eq "nwONE" || $nw eq "nwTWO") 441 { 442 $res = $res."($p1, $p2, $d, NonZeroA($d, pLexSgn, goto NotEqual ), goto Equal);" 443 } 444 else 445 { 446 $res = $res."($p1, $p2, pVariables1W, $d, NonZeroA($d, pLexSgn, goto NotEqual ), goto Equal);"; 447 } 440 448 return $res; 441 449 }
Note: See TracChangeset
for help on using the changeset viewer.