Changeset 0e4a9f in git


Ignore:
Timestamp:
Sep 12, 2011, 8:07:36 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd25190065115c859833252500a64cfb7b11e3a50')
Children:
8b1efb2b3e527671e8c39ab0f22861b67b0c18d5
Parents:
ae133ba91b95dd0c7bbb4be8f6c934e62042c013
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-09-12 20:07:36+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:12:45+01:00
Message:
ADD: simple test for polynomial multiplication
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test.cc

    rae133b r0e4a9f  
    212212  n[2]=omStrDup("z2");
    213213
    214   ring R=rDefault(32003,3,n);
     214  ring R = rDefault(32003,3,n); //  ring R = rDefault(0,3,n);
     215
     216  rWrite(R); PrintLn();
     217
     218#ifdef RDEBUG
     219  rDebugPrint(R);
     220#endif
     221
     222 
     223  poly p = p_ISet(1,R); p_SetExp(p,1,1, R); p_Setm(p, R);
     224
     225  assume( p_GetExp(p,1, R) == 1 );
     226 
     227  poly pp = pp_Mult_qq( p, p, R);
     228
     229  Print("p: "); p_Write0(p, R);
     230  Print("; p*p : "); p_Write(pp, R);
     231
     232  p_Delete(&p, R);
     233 
     234  assume( p_GetExp(pp,1, R) == 2 );
     235 
     236  p_Delete(&pp, R);
     237 
     238 
     239//  rDelete(R);
     240   
    215241  // make R the default ring:
    216242  rChangeCurrRing(R);
    217 
     243 
    218244  // create the polynomial 1
    219245  poly p1=pISet(1);
     
    226252
    227253  // print p1 + p2
    228   pWrite(p1); printf(" + \n"); pWrite(p2); printf("\n");
     254  Print("p1: "); pWrite0(p1);
     255  Print(" + p2: "); pWrite0(p2);
     256  Print("  ---- >>>> ");
    229257
    230258  // compute p1+p2
     
    233261
    234262  // clean up:
    235   pDelete(&p1);
    236    
    237   rDelete(R);
     263//  pDelete(&p1);
     264   
     265  rDelete(R); // should cleanup every belonging polynomial, right!?
    238266   
    239267   
Note: See TracChangeset for help on using the changeset viewer.