Changeset 8aa03b in git
- Timestamp:
- Aug 25, 2011, 6:36:56 PM (12 years ago)
- Branches:
- (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
- Children:
- ef6f951a70b932a931c74771bcc97ed20e73dad7
- Parents:
- 96808051cc040577fa581782fb8007fbe635d585
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-08-25 18:36:56+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:12:28+01:00
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/test.cc
r9680805 r8aa03b 323 323 feStringAppendResources(0); 324 324 PrintS(StringAppendS("\n")); 325 326 327 328 // Libpolys tests: 329 330 // construct the ring Z/32003[x,y,z] 331 // the variable names 332 char **n=(char**)omalloc(3*sizeof(char*)); 333 n[0]=omStrDup("x"); 334 n[1]=omStrDup("y"); 335 n[2]=omStrDup("z2"); 336 337 ring R=rDefault(32003,3,n); 338 // make R the default ring: 339 rChangeCurrRing(R); 340 341 // create the polynomial 1 342 poly p1=pISet(1); 343 344 // create tthe polynomial 2*x^3*z^2 345 poly p2=p_ISet(2,R); 346 pSetExp(p2,1,3); 347 pSetExp(p2,3,2); 348 pSetm(p2); 349 350 // print p1 + p2 351 pWrite(p1); printf(" + \n"); pWrite(p2); printf("\n"); 352 353 // compute p1+p2 354 p1=p_Add_q(p1,p2,R); p2=NULL; 355 pWrite(p1); 356 357 // clean up: 358 pDelete(&p1); 359 360 rDelete(R); 361 325 362 326 363 return 0; -
kernel/makefile
r9680805 r8aa03b 310 310 # My headers test 311 311 check: all test testg 312 ./test313 ./test312 SINGULAR_ROOT_DIR=`pwd/../` SINGULARPATH="$SINGULAR_ROOT_DIR/libpolys/polys/.libs" ./test 313 SINGULAR_ROOT_DIR=`pwd/../` SINGULARPATH="$SINGULAR_ROOT_DIR/libpolys/polys/.libs" ./testg -
kernel/test.cc
r9680805 r8aa03b 57 57 58 58 #include <coeffs/numbers.h> 59 #include <kernel/polys.h>60 59 61 60 #include "mod2.h" … … 316 315 317 316 317 #include "polys.h" 318 318 319 319 int main( int, char *argv[] ) … … 324 324 feStringAppendResources(0); 325 325 PrintS(StringAppendS("\n")); 326 327 328 // Libpolys tests: 329 330 // construct the ring Z/32003[x,y,z] 331 // the variable names 332 char **n=(char**)omalloc(3*sizeof(char*)); 333 n[0]=omStrDup("x"); 334 n[1]=omStrDup("y"); 335 n[2]=omStrDup("z2"); 336 337 ring R=rDefault(32003,3,n); 338 // make R the default ring: 339 rChangeCurrRing(R); 340 341 // create the polynomial 1 342 poly p1=pISet(1); 343 344 // create tthe polynomial 2*x^3*z^2 345 poly p2=p_ISet(2,R); 346 pSetExp(p2,1,3); 347 pSetExp(p2,3,2); 348 pSetm(p2); 349 350 // print p1 + p2 351 pWrite(p1); printf(" + \n"); pWrite(p2); printf("\n"); 352 353 // compute p1+p2 354 p1=p_Add_q(p1,p2,R); p2=NULL; 355 pWrite(p1); 356 357 // clean up: 358 pDelete(&p1); 359 360 rDelete(R); 361 326 362 327 363 return 0;
Note: See TracChangeset
for help on using the changeset viewer.