Changeset 4b81a90 in git for Tst


Ignore:
Timestamp:
Apr 21, 1998, 5:59:58 PM (26 years ago)
Author:
Jens Schmidt <schmidt@…>
Branches:
(u'spielwiese', 'df6a8e29030ff93c6ad53051028727af7d339fa0')
Children:
6ca22e864c938665093be3c3244ede1ba10be59d
Parents:
ddcc780f481f53c99fd39a75ee518337fb3067da
Message:
	* gcd_s.tst: recreated version from directory `tst'

	* gcd_s.tst: tests added for transcendental extensions and
	  multivariate polynomials


git-svn-id: file:///usr/local/Singular/svn/trunk@1414 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Tst/Short/gcdp_s.tst

    rddcc78 r4b81a90  
    1 // $Id: gcdp_s.tst,v 1.1.1.1 1998-04-17 15:07:40 obachman Exp $
     1// $Id: gcdp_s.tst,v 1.2 1998-04-21 15:59:58 schmidt Exp $
    22
    33//
    44// gcdp_s.tst - short tests for gcd calculations mod p.
    55//
    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 non-trivial 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
    915//
    1016
    1117LIB "tst.lib";
    1218tst_init();
    13 tst_ignore("CVS ID  : $Id: gcdp_s.tst,v 1.1.1.1 1998-04-17 15:07:40 obachman Exp $");
     19tst_ignore("CVS ID  : $Id: gcdp_s.tst,v 1.2 1998-04-21 15:59:58 schmidt Exp $");
    1420
    1521//
     
    1723//
    1824
     25tst_ignore( "ring r1=32003,x,dp;" );
    1926ring r1=32003,x,dp;
    2027
     
    2734gcd(4353, 0);
    2835
    29 // these examples fail so far!!!
    30 // gcd(0, f);
    31 // gcd(f, 0);
     36gcd(0, f);
     37gcd(f, 0);
    3238
    3339gcd(23123, f);
     
    4753gcd(f, g);
    4854
    49 f=106*x^13-583*x^12-1060*x^11+8056*x^10+1696*x^9-327*x^8+12508*x^7+8277*x^6+5609*x^5-12879*x^4+13144*x^3-2544*x^2;
    50 g=11118*x^14-5404*x^13-908*x^12-13908*x^11+3188*x^10-8818*x^9+10439*x^8-14811*x^7+15530*x^6-4891*x^5+6322*x^4+15829*x^3-13686*x^2;
    51 gcd(f, g);
    52 
    53 f=-14613*x^17+2235*x^16-298*x^15+4540*x^14+7214*x^13+5494*x^12-3122*x^11-4720*x^10+8300*x^9-6582*x^8-9908*x^7-15983*x^6-5802*x^5-8634*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^15-6420*x^14+50*x^13+434*x^12-15226*x^11+3727*x^10-14065*x^9-9751*x^8-15792*x^7+6004*x^6-5059*x^5+2479*x^4-12504*x^3-11328*x^2-11338*x-8280;
    55 gcd(f, g);
    56 
    57 f=3812*x^22-6874*x^21+12586*x^20+3003*x^19-9568*x^18+11117*x^17 +7524*x^16+11138*x^15-9743*x^14+1892*x^13+12485*x^12-569*x^11-8265*x^10-5991*x^9+13701*x^8+2644*x^7-3936*x^6-15875*x^5+1289*x^4+3956*x^3-10099*x^2-6616*x+5401;
    58 g=10652*x^20-4144*x^19-11810*x^18+8237*x^17-8675*x^16+6545*x^15-3601*x^14+14559*x^13+8090*x^12-8378*x^11+14255*x^10+8767*x^9-13932*x^8+11602*x^7-10751*x^6-4899*x^5+8637*x^4+14084*x^3-11583*x^2+5882*x+885;
    59 gcd(f, g);
    60 
    6155//
    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.
    6357//
    6458
     59tst_ignore( "ring r2=(32003,a),x,dp;" );
    6560ring r2=(32003,a),x,dp;
    6661minpoly=a^4+8734*a^3+a^2+11817*a+1;
     
    6964poly g;
    7065
    71 // first, some of the above examples
     66// first, some of the r1 examples
    7267gcd(0, 0);
    7368gcd(0, 3123);
    7469gcd(4353, 0);
    7570
    76 // these examples fail so far!!!
    77 // gcd(0, f);
    78 // gcd(f, 0);
     71gcd(0, f);
     72gcd(f, 0);
    7973
    8074gcd(23123, f);
     
    9185
    9286// 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 
    9787f=(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);
    9888g=(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);
     
    10292g=(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);
    10393gcd(f, g);
     94
     95//
     96// - ring r3=(32003,t),x,dp.
     97//
     98
     99tst_ignore( "ring r3=(32003,t),x,dp;" );
     100ring r3=(32003,t),x,dp;
     101
     102poly f=(-9554*x^4-12895*x^3-10023*x^2-6213*x);
     103poly g;
     104
     105// first, some of the r1 examples (slightly modified)
     106gcd(0, 0);
     107gcd(0, 3123*t);
     108gcd(4353, 0);
     109
     110gcd(0, f/t);
     111gcd(f, 0);
     112
     113gcd(23123/t, f);
     114gcd(f, 13123);
     115
     116// some less trivial examples
     117f=-9554*x^4-12895*x^3-10023*x^2-6213*x;
     118g=-9554*x^3-3341*x^2+6213*x;
     119gcd(f, g);
     120
     121// we go on with modified variable names
     122tst_ignore( "ring r3=(32003,a,c,e),(f,h,k),dp;" );
     123kill r3;
     124ring r3=(32003,a,c,e),(f,h,k),dp;
     125
     126poly fPoly;
     127poly gPoly;
     128
     129fPoly=(16001*c^2*f^2*k^2-16001*c*e*f*k^3+c*f^3*h*k-e*f^2*h*k^2);
     130gPoly=(c^3*e*f*h-4*c*e^2*f*h^2);
     131gcd(fPoly, gPoly);
     132
     133fPoly=(c^4*k^2-5*c^3*f*h*k+4*c^2*e*h*k^2+4*c^2*f^2*h^2-4*c*e*f*h^2*k);
     134gPoly=(-c^3*f*k^2+c^2*e*k^3+2*c^2*f^2*h*k-2*c*e*f*h*k^2);
     135gcd(fPoly, gPoly);
     136
     137fPoly=(-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^6-16001*c^2*e*f^3*h^2*k^4);
     138gPoly=(16001*c^7*e*h*k^3-15998*c^6*e*f*h^2*k^2-7*c^5*e*f^2*h^3*k-8*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*k-24*c^2*e^3*f*h^4*k^2-16*c^2*e^2*f^3*h^5+16*c*e^3*f^2*h^5*k);
     139gcd(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
     148tst_ignore( "ring r4=32003,(t,x),dp;" );
     149ring r4=32003,(t,x),dp;
     150
     151poly f=(-9554*x^4-12895*x^3-10023*x^2-6213*x);
     152poly g;
     153
     154// first, some of the r1 examples (slightly modified)
     155gcd(0, 0);
     156gcd(0, 3123*t);
     157gcd(4353, 0);
     158
     159gcd(0, f);
     160gcd(f, 0);
     161
     162gcd(23123*t, f);
     163gcd(f, 13123);
     164
     165// some less trivial examples
     166f=-9554*x^4-12895*x^3-10023*x^2-6213*x;
     167g=-9554*x^3-3341*x^2+6213*x;
     168gcd(t*f, g);
     169
     170// we go on with modified variable names
     171tst_ignore( "ring r4=32003,(a,c,e,f,h,k),dp;" );
     172kill r4;
     173ring r4=32003,(a,c,e,f,h,k),dp;
     174
     175poly fPoly;
     176poly gPoly;
     177
     178fPoly=(16001*c^2*f^2*k^2-16001*c*e*f*k^3+c*f^3*h*k-e*f^2*h*k^2);
     179gPoly=(c^3*e*f*h-4*c*e^2*f*h^2);
     180gcd(fPoly, gPoly);
     181
     182fPoly=(c^4*k^2-5*c^3*f*h*k+4*c^2*e*h*k^2+4*c^2*f^2*h^2-4*c*e*f*h^2*k);
     183gPoly=(-c^3*f*k^2+c^2*e*k^3+2*c^2*f^2*h*k-2*c*e*f*h*k^2);
     184gcd(fPoly, gPoly);
     185
     186fPoly=(-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^6-16001*c^2*e*f^3*h^2*k^4);
     187gPoly=(16001*c^7*e*h*k^3-15998*c^6*e*f*h^2*k^2-7*c^5*e*f^2*h^3*k-8*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*k-24*c^2*e^3*f*h^4*k^2-16*c^2*e^2*f^3*h^5+16*c*e^3*f^2*h^5*k);
     188gcd(fPoly, gPoly);
    104189$
Note: See TracChangeset for help on using the changeset viewer.