Changeset 4b81a90 in git
 Timestamp:
 Apr 21, 1998, 5:59:58 PM (25 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
 Children:
 6ca22e864c938665093be3c3244ede1ba10be59d
 Parents:
 ddcc780f481f53c99fd39a75ee518337fb3067da
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Tst/Short/gcdp_s.tst
rddcc78 r4b81a90 1 // $Id: gcdp_s.tst,v 1. 1.1.1 19980417 15:07:40 obachmanExp $1 // $Id: gcdp_s.tst,v 1.2 19980421 15:59:58 schmidt Exp $ 2 2 3 3 // 4 4 // gcdp_s.tst  short tests for gcd calculations mod p. 5 5 // 6 // Note: gcd(0, x) fails with a SEGV signal! 7 // To Do: gcd calculations over transcendental extensions of 8 // finite fields. 6 // All univariate nontrivial examples come from gcdUnivP.fex 7 // or gcdUnivPAlpha.fex. 8 // 9 // The example in variables `a', `c', `e', ... came from `untitled2(6/p/1)' 10 // in stdMultivPGcd.in. 11 // 12 // To Do: 13 // 14 // o multivariate gcd calculations with parameters 9 15 // 10 16 11 17 LIB "tst.lib"; 12 18 tst_init(); 13 tst_ignore("CVS ID : $Id: gcdp_s.tst,v 1. 1.1.1 19980417 15:07:40 obachmanExp $");19 tst_ignore("CVS ID : $Id: gcdp_s.tst,v 1.2 19980421 15:59:58 schmidt Exp $"); 14 20 15 21 // … … 17 23 // 18 24 25 tst_ignore( "ring r1=32003,x,dp;" ); 19 26 ring r1=32003,x,dp; 20 27 … … 27 34 gcd(4353, 0); 28 35 29 // these examples fail so far!!! 30 // gcd(0, f); 31 // gcd(f, 0); 36 gcd(0, f); 37 gcd(f, 0); 32 38 33 39 gcd(23123, f); … … 47 53 gcd(f, g); 48 54 49 f=106*x^13583*x^121060*x^11+8056*x^10+1696*x^9327*x^8+12508*x^7+8277*x^6+5609*x^512879*x^4+13144*x^32544*x^2;50 g=11118*x^145404*x^13908*x^1213908*x^11+3188*x^108818*x^9+10439*x^814811*x^7+15530*x^64891*x^5+6322*x^4+15829*x^313686*x^2;51 gcd(f, g);52 53 f=14613*x^17+2235*x^16298*x^15+4540*x^14+7214*x^13+5494*x^123122*x^114720*x^10+8300*x^96582*x^89908*x^715983*x^65802*x^58634*x^4+7899*x^3+10556*x^2+6931*x+11063;54 g=10168*x^20+6674*x^19+3004*x^18+13113*x^17+9449*x^16+9097*x^156420*x^14+50*x^13+434*x^1215226*x^11+3727*x^1014065*x^99751*x^815792*x^7+6004*x^65059*x^5+2479*x^412504*x^311328*x^211338*x8280;55 gcd(f, g);56 57 f=3812*x^226874*x^21+12586*x^20+3003*x^199568*x^18+11117*x^17 +7524*x^16+11138*x^159743*x^14+1892*x^13+12485*x^12569*x^118265*x^105991*x^9+13701*x^8+2644*x^73936*x^615875*x^5+1289*x^4+3956*x^310099*x^26616*x+5401;58 g=10652*x^204144*x^1911810*x^18+8237*x^178675*x^16+6545*x^153601*x^14+14559*x^13+8090*x^128378*x^11+14255*x^10+8767*x^913932*x^8+11602*x^710751*x^64899*x^5+8637*x^4+14084*x^311583*x^2+5882*x+885;59 gcd(f, g);60 61 55 // 62 //  ring r2=(32003,a),x,dp .56 //  ring r2=(32003,a),x,dp; minpoly=a^4+8734*a^3+a^2+11817*a+1. 63 57 // 64 58 59 tst_ignore( "ring r2=(32003,a),x,dp;" ); 65 60 ring r2=(32003,a),x,dp; 66 61 minpoly=a^4+8734*a^3+a^2+11817*a+1; … … 69 64 poly g; 70 65 71 // first, some of the aboveexamples66 // first, some of the r1 examples 72 67 gcd(0, 0); 73 68 gcd(0, 3123); 74 69 gcd(4353, 0); 75 70 76 // these examples fail so far!!! 77 // gcd(0, f); 78 // gcd(f, 0); 71 gcd(0, f); 72 gcd(f, 0); 79 73 80 74 gcd(23123, f); … … 91 85 92 86 // now, examples involving the algebraic variable 93 f=(25836*a^3*x^6+30467*a^2*x^6+26792*a*x^6+30467*x^6+27083*a^3*x^5+30808*a^2*x^5+28163*a*x^5+292*x^5+12440*a^3*x^4+19396*a^2*x^4+19616*a*x^4+23236*x^4+25156*a^3*x^3+31764*a^2*x^3+31235*a*x^3+6459*x^3);94 g=(14670*a^3*x^6+19715*a^2*x^6+22318*a*x^6+19715*x^6+19743*a^3*x^5+28179*a^2*x^5+19715*a*x^5+7335*x^5+6379*a^3*x^4+11397*a^2*x^4+23599*a*x^4+9861*x^4+16005*a^3*x^3+31525*a^2*x^3+30467*a*x^3+12918*x^3);95 gcd(f, g);96 97 87 f=(21147*a^3*x^5+10147*a^3*x^4+8142*a^2*x^4+27671*a*x^4+29289*x^4+29289*a^3*x^3); 98 88 g=(6167*a^3*x^6+1536*a^2*x^6+5211*a*x^6+1536*x^6+17534*a^3*x^5+478*a^2*x^5+1536*a*x^5+19085*x^5+3203*a^3*x^4+26578*a^2*x^4+17052*a*x^4+26770*x^4+26002*a^3*x^3+24062*a^2*x^3+192*a*x^3+6386*x^3); … … 102 92 g=(8192*a^3*x^10+8957*a^2*x^10+9659*a^3*x^9+28672*a^2*x^9+4553*a*x^9+12288*x^9+5819*a^3*x^8+320*a^2*x^8+14380*a*x^8+12104*x^8+12047*a^3*x^7+19823*a^2*x^7+6824*a*x^7+4335*x^7+29376*a^3*x^6+22190*a^2*x^6+31239*a*x^6+22647*x^6); 103 93 gcd(f, g); 94 95 // 96 //  ring r3=(32003,t),x,dp. 97 // 98 99 tst_ignore( "ring r3=(32003,t),x,dp;" ); 100 ring r3=(32003,t),x,dp; 101 102 poly f=(9554*x^412895*x^310023*x^26213*x); 103 poly g; 104 105 // first, some of the r1 examples (slightly modified) 106 gcd(0, 0); 107 gcd(0, 3123*t); 108 gcd(4353, 0); 109 110 gcd(0, f/t); 111 gcd(f, 0); 112 113 gcd(23123/t, f); 114 gcd(f, 13123); 115 116 // some less trivial examples 117 f=9554*x^412895*x^310023*x^26213*x; 118 g=9554*x^33341*x^2+6213*x; 119 gcd(f, g); 120 121 // we go on with modified variable names 122 tst_ignore( "ring r3=(32003,a,c,e),(f,h,k),dp;" ); 123 kill r3; 124 ring r3=(32003,a,c,e),(f,h,k),dp; 125 126 poly fPoly; 127 poly gPoly; 128 129 fPoly=(16001*c^2*f^2*k^216001*c*e*f*k^3+c*f^3*h*ke*f^2*h*k^2); 130 gPoly=(c^3*e*f*h4*c*e^2*f*h^2); 131 gcd(fPoly, gPoly); 132 133 fPoly=(c^4*k^25*c^3*f*h*k+4*c^2*e*h*k^2+4*c^2*f^2*h^24*c*e*f*h^2*k); 134 gPoly=(c^3*f*k^2+c^2*e*k^3+2*c^2*f^2*h*k2*c*e*f*h*k^2); 135 gcd(fPoly, gPoly); 136 137 fPoly=(8001*c^4*e*f*k^6+8001*c^4*f^3*h*k^4+8001*c^3*e^2*k^7+8001*c^3*e*f^2*h*k^5+16001*c^3*f^4*h^2*k^3+16001*c^2*e^2*f*h*k^616001*c^2*e*f^3*h^2*k^4); 138 gPoly=(16001*c^7*e*h*k^315998*c^6*e*f*h^2*k^27*c^5*e*f^2*h^3*k8*c^4*e^2*f*h^3*k^2+4*c^4*e*f^3*h^4+8*c^3*e^3*h^3*k^3+24*c^3*e^2*f^2*h^4*k24*c^2*e^3*f*h^4*k^216*c^2*e^2*f^3*h^5+16*c*e^3*f^2*h^5*k); 139 gcd(fPoly, gPoly); 140 141 // 142 //  ring r4=32003,(t,x),dp. 143 // 144 // The examples from r4 are those from r3 with parameters 145 // changed to ring variables. 146 // 147 148 tst_ignore( "ring r4=32003,(t,x),dp;" ); 149 ring r4=32003,(t,x),dp; 150 151 poly f=(9554*x^412895*x^310023*x^26213*x); 152 poly g; 153 154 // first, some of the r1 examples (slightly modified) 155 gcd(0, 0); 156 gcd(0, 3123*t); 157 gcd(4353, 0); 158 159 gcd(0, f); 160 gcd(f, 0); 161 162 gcd(23123*t, f); 163 gcd(f, 13123); 164 165 // some less trivial examples 166 f=9554*x^412895*x^310023*x^26213*x; 167 g=9554*x^33341*x^2+6213*x; 168 gcd(t*f, g); 169 170 // we go on with modified variable names 171 tst_ignore( "ring r4=32003,(a,c,e,f,h,k),dp;" ); 172 kill r4; 173 ring r4=32003,(a,c,e,f,h,k),dp; 174 175 poly fPoly; 176 poly gPoly; 177 178 fPoly=(16001*c^2*f^2*k^216001*c*e*f*k^3+c*f^3*h*ke*f^2*h*k^2); 179 gPoly=(c^3*e*f*h4*c*e^2*f*h^2); 180 gcd(fPoly, gPoly); 181 182 fPoly=(c^4*k^25*c^3*f*h*k+4*c^2*e*h*k^2+4*c^2*f^2*h^24*c*e*f*h^2*k); 183 gPoly=(c^3*f*k^2+c^2*e*k^3+2*c^2*f^2*h*k2*c*e*f*h*k^2); 184 gcd(fPoly, gPoly); 185 186 fPoly=(8001*c^4*e*f*k^6+8001*c^4*f^3*h*k^4+8001*c^3*e^2*k^7+8001*c^3*e*f^2*h*k^5+16001*c^3*f^4*h^2*k^3+16001*c^2*e^2*f*h*k^616001*c^2*e*f^3*h^2*k^4); 187 gPoly=(16001*c^7*e*h*k^315998*c^6*e*f*h^2*k^27*c^5*e*f^2*h^3*k8*c^4*e^2*f*h^3*k^2+4*c^4*e*f^3*h^4+8*c^3*e^3*h^3*k^3+24*c^3*e^2*f^2*h^4*k24*c^2*e^3*f*h^4*k^216*c^2*e^2*f^3*h^5+16*c*e^3*f^2*h^5*k); 188 gcd(fPoly, gPoly); 104 189 $
Note: See TracChangeset
for help on using the changeset viewer.