Changeset 7c362e in git


Ignore:
Timestamp:
Aug 26, 2010, 6:20:54 PM (14 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a5cd69539ad1429c09a8881386628bbf8d1fc2fc
Parents:
2e6a0618fb4aec3b476ffa839f58c0bbe38e649c
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2010-08-26 18:20:54+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:28+01:00
Message:
Minor fixes/better example
File:
1 edited

Legend:

Unmodified
Added
Removed
  • coeffs/test.cc

    r2e6a06 r7c362e  
    2323
    2424
     25#pragma GCC diagnostic ignored "-Wwrite-strings"
     26
    2527bool Test(const coeffs r)
    2628{
    27   number a = n_Init(666, r);
     29  number a = n_Init(66666, r);
    2830   
    2931  StringSetS("a: ");
     
    4143  if (getCoeffType(r) == n_GF) //some special test for GF
    4244  {
    43     number z= nfPar (2, r);
    44     StringSetS("z: ");
     45    number z = nfPar (0, r); // also any integer instead of 0
     46    StringSetS("Generator: ");
    4547    n_Test(z,r); n_Write (z,r);
    4648    PrintS(StringAppend("\n"));
     49    n_Delete(&z, r);   
    4750  }
    4851 
     
    5255  n_Test(aa,r); n_Write(aa, r);
    5356  PrintS(StringAppend("\n"));
    54 
    5557 
    5658  number aa2 = n_Mult(a, two, r);
     
    6163
    6264  number aa1 = n_Mult(two, a, r);
    63 
    6465 
    6566  StringSetS("aa1 = 2 * a: ");
     
    282283   param.GFChar= 5;
    283284   param.GFSize= 25;
    284    param.GFPar_name= "Z";
     285
     286   param.GFPar_name= (const char*)"q";
    285287
    286288   if( Test(type, (void*) &param) )
    287289     c ++;
    288290 
    289 
    290291 
    291292  TODO(Somebody, floating arithmetics via GMP rely on two global variables (see setGMPFloatDigits). Fix it!);
     
    301302    c ++;
    302303 
    303 
    304   type = nRegister( n_GF, nfInitChar); assume( type == n_GF );
    305   if( Test(type) )
    306     c ++;
    307304 
    308305#ifdef HAVE_RINGS
Note: See TracChangeset for help on using the changeset viewer.