Changeset 482844 in git
- Timestamp:
- Jul 3, 2000, 12:22:17 PM (24 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 6361e617ac5bc0e47f935d3e88a540e628f89111
- Parents:
- db65122f57a5f541c93a6f282e5baf4881b09dca
- Location:
- Singular
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/clapconv.cc
rdb65122 r482844 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapconv.cc,v 1.2 4 2000-06-02 07:46:57 SingularExp $5 // $Id: clapconv.cc,v 1.25 2000-07-03 10:22:17 pohl Exp $ 6 6 /* 7 7 * ABSTRACT: convert data between Singular and factory … … 44 44 CanonicalForm result = 0; 45 45 int e, n = pVariables; 46 assume( rPar(currRing)==0); 46 47 47 48 while ( p != NULL ) … … 311 312 CanonicalForm result = 0; 312 313 int e, n = pVariables; 314 int off=rPar(currRing); 313 315 314 316 On(SW_RATIONAL); … … 319 321 { 320 322 if ( (e = pGetExp( p, i )) != 0 ) 321 term *= power( Variable( i +1), e );323 term *= power( Variable( i + off), e ); 322 324 } 323 325 result += term; … … 329 331 poly convClapAPSingAP ( const CanonicalForm & f ) 330 332 { 331 int n = pVariables+1+1 /* =rPar(currRing)*/; 332 /* ASSERT( level( f ) <= pVariables, "illegal number of variables" ); */ 333 int n = pVariables+1+1/*rPar(currRing)*/; 333 334 int * exp = new int[n]; 334 335 // for ( int i = 0; i < n; i++ ) exp[i] = 0; … … 345 346 if (f == 0) 346 347 return; 348 int off=rPar(currRing); 347 349 if ( ! f.inCoeffDomain() ) 348 350 { 349 351 int l = f.level(); 350 if (l==1) PrintS("f.inCoeffDomain()=FALSE and level=1 ?\n");351 352 for ( CFIterator i = f; i.hasTerms(); i++ ) 352 353 { 353 exp[l -1] = i.exp();354 exp[l] = i.exp(); 354 355 convRecAP( i.coeff(), exp, result ); 355 356 } 356 exp[l -1] = 0;357 exp[l] = 0; 357 358 } 358 359 else … … 363 364 poly term = pInit(); 364 365 pNext( term ) = NULL; 365 for ( int i = 1; i <= pVariables; i++ ) 366 pSetExp( term, i , exp[i]); 366 int i; 367 for ( i = 1; i <= pVariables; i++ ) 368 pSetExp( term, i , exp[i+off]); 367 369 pSetComp(term, 0); 370 for ( i = 0; i < off; i++ ) 371 z->e[i]+=exp[i+1]; 368 372 pGetCoeff(term)=(number)Alloc0SizeOf(rnumber); 369 373 ((lnumber)pGetCoeff(term))->z=z; … … 382 386 { 383 387 CanonicalForm term; 384 /* does only work for finite fields */385 if ( getCharacteristic() != 0)388 /* does only work for finite fields:Z/p */ 389 if ( rField_is_Zp_a() ) 386 390 { 387 391 Off(SW_USE_EZGCD); … … 394 398 //&& ( napGetCoeff( p )->s == 0)) 395 399 // naNormalize( naGetCoeff( p ) ); 396 if ( (int)(napGetCoeff( p )) & 1)400 if ( (int)(napGetCoeff( p )) & SR_INT ) 397 401 term = nlInt( napGetCoeff( p ) ); 402 //term = SR_TO_INT(napGetCoeff( p )) ; 398 403 else 399 404 { … … 503 508 { 504 509 int n = pVariables+1; 505 /* ASSERT( level( f ) <= pVariables, "illegal number of variables" ); */506 510 int * exp = new int[n]; 507 511 // for ( int i = 0; i < n; i++ ) exp[i] = 0; -
Singular/clapsing.cc
rdb65122 r482844 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapsing.cc,v 1.6 7 2000-06-14 07:29:59 SingularExp $5 // $Id: clapsing.cc,v 1.68 2000-07-03 10:22:17 pohl Exp $ 6 6 /* 7 7 * ABSTRACT: interface between Singular and factory … … 133 133 StringSetS( tag ); \ 134 134 napWrite( f ); \ 135 PrintS(StringAppendS("\n"));135 pRINtS(StringAppendS("\n")); 136 136 // CanonicalForm f, represents transcendent extension 137 137 #define FACTORY_CFTROUT_POLY( tag, f ) \ … … 294 294 if (currRing->minpoly!=NULL) 295 295 { 296 Variable X(i +rPar(currRing));296 Variable X(i); 297 297 CanonicalForm mipo=convSingTrClapP(((lnumber)currRing->minpoly)->z); 298 298 Variable a=rootOf(mipo); -
Singular/longrat.cc
rdb65122 r482844 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: longrat.cc,v 1.2 8 2000-05-02 14:55:41 SingularExp $ */4 /* $Id: longrat.cc,v 1.29 2000-07-03 10:21:20 pohl Exp $ */ 5 5 /* 6 6 * ABSTRACT: computation with long rational numbers (Hubert Grassmann) … … 106 106 /*#define SR_INT 1*/ 107 107 /*#define INT_TO_SR(INT) ((number) (((long)INT << 2) + SR_INT))*/ 108 #define SR_TO_INT(SR) (((long)SR) >> 2)108 // #define SR_TO_INT(SR) (((long)SR) >> 2) 109 109 110 110 #define MP_SMALL 1 -
Singular/longrat.h
rdb65122 r482844 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: longrat.h,v 1.1 5 1999-11-15 17:20:20 obachmanExp $ */6 /* $Id: longrat.h,v 1.16 2000-07-03 10:21:21 pohl Exp $ */ 7 7 /* 8 8 * ABSTRACT: computation with long rational numbers … … 30 30 #define SR_INT 1 31 31 #define INT_TO_SR(INT) ((number) (((long)INT << 2) + SR_INT)) 32 #define SR_TO_INT(SR) (((long)SR) >> 2) 33 32 34 33 35 #define MP_SMALL 1 -
Singular/subexpr.cc
rdb65122 r482844 5 5 * ABSTRACT: handling of leftv 6 6 */ 7 /* $Id: subexpr.cc,v 1.5 6 2000-04-27 10:07:11 obachmanExp $ */7 /* $Id: subexpr.cc,v 1.57 2000-07-03 10:21:21 pohl Exp $ */ 8 8 9 9 #include <stdlib.h> … … 978 978 if (rtyp == IDHDL) 979 979 { 980 (void*) IDDATA((idhdl)data) =what;980 IDDATA((idhdl)data) = (char *)what; 981 981 } 982 982 else
Note: See TracChangeset
for help on using the changeset viewer.