Changeset b06a25 in git for Tst


Ignore:
Timestamp:
Apr 24, 1998, 8:49:21 AM (26 years ago)
Author:
Jens Schmidt <schmidt@…>
Branches:
(u'spielwiese', '9bfa4dc4755d071a0d1290dd0e3cda52bac9f27e')
Children:
e13573d5aec0ccb63da7085a6de13dc1ed4169af
Parents:
7e6eae9124ba27d73b43194d63b7a19393750901
Message:
	* gcdp_s.tst: in addition to regular results, the normalized gcd is
	  printed


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

Legend:

Unmodified
Added
Removed
  • Tst/Short/gcdp_s.tst

    r7e6eae9 rb06a25  
    1 // $Id: gcdp_s.tst,v 1.2 1998-04-21 15:59:58 schmidt Exp $
     1// $Id: gcdp_s.tst,v 1.3 1998-04-24 06:49:21 schmidt Exp $
    22
    33//
     
    1717LIB "tst.lib";
    1818tst_init();
    19 tst_ignore("CVS ID  : $Id: gcdp_s.tst,v 1.2 1998-04-21 15:59:58 schmidt Exp $");
     19tst_ignore("CVS ID  : $Id: gcdp_s.tst,v 1.3 1998-04-24 06:49:21 schmidt Exp $");
     20
     21//
     22// - functions.
     23//
     24
     25//
     26// simplifyGcd() - print gcd as well as normalized gcd.
     27//
     28proc simplifyGcd ( poly f, poly g )
     29{
     30  poly d=gcd( f, g );
     31  d;
     32  simplify( d, 1 );
     33}
    2034
    2135//
     
    3347gcd(0, 3123);
    3448gcd(4353, 0);
    35 
    36 gcd(0, f);
    37 gcd(f, 0);
    38 
    39 gcd(23123, f);
    40 gcd(f, 13123);
    41 
    42 // some less trivial examples
    43 f=-9554*x^4-12895*x^3-10023*x^2-6213*x;
    44 g=-9554*x^3-3341*x^2+6213*x;
    45 gcd(f, g);
     49simplifyGcd(0, 0);
     50simplifyGcd(0, 3123);
     51simplifyGcd(4353, 0);
     52
     53simplifyGcd(0, f);
     54simplifyGcd(f, 0);
     55
     56simplifyGcd(23123, f);
     57simplifyGcd(f, 13123);
     58
     59// some less trivial examples
     60f=-9554*x^4-12895*x^3-10023*x^2-6213*x;
     61g=-9554*x^3-3341*x^2+6213*x;
     62simplifyGcd(f, g);
    4663
    4764f=-11265*x^6+12161*x^5+10369*x^4-12161*x^3+896*x^2;
    4865g=10669*x^8-10673*x^7+5*x^6+8*x^5-10681*x^4+10665*x^3+7*x^2;
    49 gcd(f, g);
     66simplifyGcd(f, g);
    5067
    5168f=-7918*x^9-14406*x^8-7256*x^7+2092*x^6-2198*x^5-12539*x^4-14631*x^3-7150*x^2;
    5269g=-14833*x^13-7011*x^12+15121*x^11-10864*x^10+12943*x^9-9871*x^8+10354*x^7-1437*x^6+6604*x^5-10394*x^4-3231*x^3-9348*x^2-2092*x;
    53 gcd(f, g);
     70simplifyGcd(f, g);
    5471
    5572//
     
    6582
    6683// first, some of the r1 examples
    67 gcd(0, 0);
    68 gcd(0, 3123);
    69 gcd(4353, 0);
    70 
    71 gcd(0, f);
    72 gcd(f, 0);
    73 
    74 gcd(23123, f);
    75 gcd(f, 13123);
    76 
    77 // some less trivial examples
    78 f=-9554*x^4-12895*x^3-10023*x^2-6213*x;
    79 g=-9554*x^3-3341*x^2+6213*x;
    80 gcd(f, g);
     84simplifyGcd(0, 0);
     85simplifyGcd(0, 3123);
     86simplifyGcd(4353, 0);
     87
     88simplifyGcd(0, f);
     89simplifyGcd(f, 0);
     90
     91simplifyGcd(23123, f);
     92simplifyGcd(f, 13123);
     93
     94// some less trivial examples
     95f=-9554*x^4-12895*x^3-10023*x^2-6213*x;
     96g=-9554*x^3-3341*x^2+6213*x;
     97simplifyGcd(f, g);
    8198
    8299f=-11265*x^6+12161*x^5+10369*x^4-12161*x^3+896*x^2;
    83100g=10669*x^8-10673*x^7+5*x^6+8*x^5-10681*x^4+10665*x^3+7*x^2;
    84 gcd(f, g);
     101simplifyGcd(f, g);
    85102
    86103// now, examples involving the algebraic variable
    87104f=(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);
    88105g=(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);
    89 gcd(f, g);
     106simplifyGcd(f, g);
    90107
    91108f=(2295*a^2*x^11+5897*a^3*x^10+765*a^2*x^10+27718*a^3*x^9+1283*a^2*x^9+23792*a*x^9+518*x^9+22026*a^3*x^8+11468*a^2*x^8+16834*a*x^8+24778*x^8+28460*a^3*x^7+8140*a^2*x^7+28036*a*x^7+1613*x^7+18196*a^3*x^6+13274*a^2*x^6+4638*a*x^6+31194*x^6+12206*a^3*x^5+10349*a^2*x^5+30979*a*x^5+8612*x^5);
    92109g=(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);
    93 gcd(f, g);
     110simplifyGcd(f, g);
    94111
    95112//
     
    104121
    105122// 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^4-12895*x^3-10023*x^2-6213*x;
    118 g=-9554*x^3-3341*x^2+6213*x;
    119 gcd(f, g);
     123simplifyGcd(0, 0);
     124simplifyGcd(0, 3123*t);
     125simplifyGcd(4353, 0);
     126
     127simplifyGcd(0, f/t);
     128simplifyGcd(f, 0);
     129
     130simplifyGcd(23123/t, f);
     131simplifyGcd(f, 13123);
     132
     133// some less trivial examples
     134f=-9554*x^4-12895*x^3-10023*x^2-6213*x;
     135g=-9554*x^3-3341*x^2+6213*x;
     136simplifyGcd(f, g);
    120137
    121138// we go on with modified variable names
     
    129146fPoly=(16001*c^2*f^2*k^2-16001*c*e*f*k^3+c*f^3*h*k-e*f^2*h*k^2);
    130147gPoly=(c^3*e*f*h-4*c*e^2*f*h^2);
    131 gcd(fPoly, gPoly);
     148simplifyGcd(fPoly, gPoly);
    132149
    133150fPoly=(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);
    134151gPoly=(-c^3*f*k^2+c^2*e*k^3+2*c^2*f^2*h*k-2*c*e*f*h*k^2);
    135 gcd(fPoly, gPoly);
     152simplifyGcd(fPoly, gPoly);
    136153
    137154fPoly=(-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);
    138155gPoly=(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);
    139 gcd(fPoly, gPoly);
     156simplifyGcd(fPoly, gPoly);
    140157
    141158//
     
    153170
    154171// 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^4-12895*x^3-10023*x^2-6213*x;
    167 g=-9554*x^3-3341*x^2+6213*x;
    168 gcd(t*f, g);
     172simplifyGcd(0, 0);
     173simplifyGcd(0, 3123*t);
     174simplifyGcd(4353, 0);
     175
     176simplifyGcd(0, f);
     177simplifyGcd(f, 0);
     178
     179simplifyGcd(23123*t, f);
     180simplifyGcd(f, 13123);
     181
     182// some less trivial examples
     183f=-9554*x^4-12895*x^3-10023*x^2-6213*x;
     184g=-9554*x^3-3341*x^2+6213*x;
     185simplifyGcd(t*f, g);
    169186
    170187// we go on with modified variable names
     
    178195fPoly=(16001*c^2*f^2*k^2-16001*c*e*f*k^3+c*f^3*h*k-e*f^2*h*k^2);
    179196gPoly=(c^3*e*f*h-4*c*e^2*f*h^2);
    180 gcd(fPoly, gPoly);
     197simplifyGcd(fPoly, gPoly);
    181198
    182199fPoly=(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);
    183200gPoly=(-c^3*f*k^2+c^2*e*k^3+2*c^2*f^2*h*k-2*c*e*f*h*k^2);
    184 gcd(fPoly, gPoly);
     201simplifyGcd(fPoly, gPoly);
    185202
    186203fPoly=(-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);
    187204gPoly=(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);
    188 gcd(fPoly, gPoly);
     205simplifyGcd(fPoly, gPoly);
    189206$
Note: See TracChangeset for help on using the changeset viewer.