- Timestamp:
- Jan 30, 2024, 3:33:44 PM (4 months ago)
- Branches:
- (u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- 4007108a12a7a307927d3cdab13500f28250b462
- Parents:
- 6661730666f9132b9dbe855e475650883c272a6e
- Location:
- Singular/LIB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/hyperel.lib
r666173 r1e5a2f 127 127 //====================== Remainder of a polynomial division =================== 128 128 129 proc divrem(poly f,poly g)130 "USAGE: divrem(f,g); f,g poly129 proc Divrem(poly f,poly g) 130 "USAGE: Divrem(f,g); f,g poly 131 131 RETURN: remainder of the division f/g 132 132 NOTE: Computes R, s.t. f=a*g + R, and deg(R) < deg(g) 133 EXAMPLE: example divrem; shows an example133 EXAMPLE: example Divrem; shows an example 134 134 " 135 135 { … … 139 139 { "EXAMPLE:"; echo = 2; 140 140 ring R=0,x,dp; 141 divrem(x2+1,x2);141 Divrem(x2+1,x2); 142 142 } 143 143 … … 174 174 B=B+y[i]*m[i]*b[i]; 175 175 } 176 B= divrem(B,M);176 B=Divrem(B,M); 177 177 return(B); 178 178 } … … 272 272 N=r1*r1 + r1*r2*h-r2*r2*f; 273 273 r[i+1]=list(N/(var(1)-P[1]),0,n[1],n[2]); 274 while (( divrem(r[i+1][1],var(1)-P[1]) ==0) and (divrem(r[i+1][2],var(1)-P[1]) ==0) and (divrem(r[i+1][3],var(1)-P[1]) ==0) and (divrem(r[i+1][4],var(1)-P[1]) ==0))274 while ((Divrem(r[i+1][1],var(1)-P[1]) ==0) and (Divrem(r[i+1][2],var(1)-P[1]) ==0) and (Divrem(r[i+1][3],var(1)-P[1]) ==0) and (Divrem(r[i+1][4],var(1)-P[1]) ==0)) 275 275 { 276 276 // reducing the rationl function … … 326 326 k=1; 327 327 328 while ( divrem(b[i]*b[i] + b[i] *h - f,(var(1)-P[i][1])^(P[i][3])) != 0)328 while (Divrem(b[i]*b[i] + b[i] *h - f,(var(1)-P[i][1])^(P[i][3])) != 0) 329 329 { 330 330 k=k+1; // b[i]=P[i][2]; … … 389 389 c=P[i][2]; 390 390 r=0,-1,1,0; 391 while ( divrem(b[i]*b[i] + b[i] *h - f,(var(1)-P[i][1])^(P[i][3])) != 0)391 while (Divrem(b[i]*b[i] + b[i] *h - f,(var(1)-P[i][1])^(P[i][3])) != 0) 392 392 { 393 393 k=k+1; … … 401 401 Norm=r1*r1 + r1*r2*h-r2*r2*f; 402 402 r=list(Norm/(var(1)-P[i][1]),0,n[1],n[2]); 403 while (( divrem(r[1],var(1)-P[i][1]) ==0) and (divrem(r[2],var(1)-P[i][1]) ==0) and (divrem(r[3],var(1)-P[i][1]) ==0) and (divrem(r[4],var(1)-P[i][1]) ==0))403 while ((Divrem(r[1],var(1)-P[i][1]) ==0) and (Divrem(r[2],var(1)-P[i][1]) ==0) and (Divrem(r[3],var(1)-P[i][1]) ==0) and (Divrem(r[4],var(1)-P[i][1]) ==0)) 404 404 { 405 405 … … 443 443 poly gg=g; 444 444 int i; 445 while ( divrem(gg,var(1)-x0) ==0 )445 while ( Divrem(gg,var(1)-x0) ==0 ) 446 446 { 447 447 i=i+1; … … 656 656 " 657 657 { 658 if ( deg(D[2]) >= deg(D[1]) or divrem(D[2]^2+D[2]*h-f,D[1]) != 0 )658 if ( deg(D[2]) >= deg(D[1]) or Divrem(D[2]^2+D[2]*h-f,D[1]) != 0 ) 659 659 { 660 660 ERROR("Pair of polynomials doesn't belong to semireduced divisor!"); … … 705 705 { 706 706 a=D[1]*Q[1]; 707 b= divrem( e[2]*D[1]*Q[2] + e[3]*Q[1]*D[2] ,a);707 b=Divrem( e[2]*D[1]*Q[2] + e[3]*Q[1]*D[2] ,a); 708 708 return(list(a,b)); 709 709 } … … 713 713 poly s3=c[3]; 714 714 a=D[1]*Q[1]/c[1]^2; 715 b= divrem((s1*D[1]*Q[2] + s2*Q[1]*D[2] + s3*(D[2]*Q[2] + f))/c[1],a);715 b=Divrem((s1*D[1]*Q[2] + s2*Q[1]*D[2] + s3*(D[2]*Q[2] + f))/c[1],a); 716 716 return(list(a,b)); 717 717 } … … 746 746 { 747 747 N[1]=(f - N[2]*h - N[2]^2)/N[1]; 748 N[2]= divrem(-h-N[2],N[1]);748 N[2]=Divrem(-h-N[2],N[1]); 749 749 } 750 750 N[1]=N[1]/leadcoef(N[1]); … … 778 778 list c=extgcd(D[1], 2*D[2] + h); 779 779 poly a=D[1]*D[1]/c[1]^2; 780 poly b= divrem((c[2]*D[1]*D[2] + c[3]*(D[2]*D[2] + f))/c[1],a);780 poly b=Divrem((c[2]*D[1]*D[2] + c[3]*(D[2]*D[2] + f))/c[1],a); 781 781 return(cantorred(list(a,b),h,f)); 782 782 } -
Singular/LIB/pfd.lib
r666173 r1e5a2f 475 475 matrix T; 476 476 ideal q_std = liftstd(q_denom,T); 477 list divrem = division(f,q_std);478 poly r = divrem[2][1]/divrem[3][1,1];477 list Divrem = division(f,q_std); 478 poly r = Divrem[2][1]/Divrem[3][1,1]; 479 479 480 480 if(r!=0) … … 486 486 } // not help in the next step (alg. depend. decomposition) 487 487 488 matrix a = divrem[1]/divrem[3][1,1]; // now f = r + a[1,1]*q_std[1] + ... +a[m,1]*q_std[m]488 matrix a = Divrem[1]/Divrem[3][1,1]; // now f = r + a[1,1]*q_std[1] + ... +a[m,1]*q_std[m] 489 489 a = T*a; // lift coefficients ==> now f = r + a[1,1]*q[1] + ... +a[m,1]*q[m] 490 490 … … 632 632 matrix T; 633 633 ideal q_std = liftstd(q_denom,T); 634 list divrem = division(f,q_std);635 matrix a = divrem[1]/divrem[3][1,1];636 poly r = divrem[2][1]/divrem[3][1,1]; // now f = r + a[1,1]*q_std[1] + ... +a[m,1]*q_std[m]634 list Divrem = division(f,q_std); 635 matrix a = Divrem[1]/Divrem[3][1,1]; 636 poly r = Divrem[2][1]/Divrem[3][1,1]; // now f = r + a[1,1]*q_std[1] + ... +a[m,1]*q_std[m] 637 637 a = T*a; // lift coefficients ==> now f = r + a[1,1]*q[1] + ... +a[m,1]*q[m] 638 638
Note: See TracChangeset
for help on using the changeset viewer.