Changeset a13956 in git
- Timestamp:
- Nov 9, 2010, 12:01:07 PM (13 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ba3e3ef698fa0b7c5867199959cc83330073d3cb')
- Children:
- c48726524b56e7c3adf69f25d82e664ace8c9211
- Parents:
- c6303a2b3f5bacd5773ec7cc726ac4487379de70
- Location:
- libfac
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
libfac/charset/charset.cc
rc6303a ra13956 41 41 #endif 42 42 #include "debug.h" 43 44 #ifdef SINGULAR45 #define HAVE_SINGULAR_ERROR46 #endif47 48 #ifdef HAVE_SINGULAR_ERROR49 extern "C" { void WerrorS(const char *); }50 extern "C" { void WarnS(const char *); }51 #endif52 43 53 44 // the next computes a characteristic set (a basic set in Wang's sense) -
libfac/factor/Factor.cc
rc6303a ra13956 32 32 33 33 34 #ifdef SINGULAR35 #define HAVE_SINGULAR_ERROR36 #endif37 38 #ifdef HAVE_SINGULAR_ERROR39 extern "C" { void WerrorS(const char *); }40 extern "C" { void WarnS(const char *); }41 #endif42 43 34 #ifdef FACTORDEBUG 44 35 # define DEBUGOUTPUT … … 294 285 else 295 286 { 296 #ifdef HAVE_SINGULAR_ERROR 297 WerrorS("libfac: ERROR: not_monic1: case lt is a sum."); 298 #else 299 #ifndef NOSTREAMIO 300 CERR << "libfac: ERROR: not_monic1: case lt is a sum.\n" 301 << errmsg << "\n"; 302 #endif 303 #endif 287 factoryError("libfac: ERROR: not_monic1: case lt is a sum."); 304 288 } 305 289 } … … 314 298 else 315 299 { 316 #ifdef HAVE_SINGULAR_ERROR 317 WerrorS("libfac: ERROR: not_monic2: case lt is a sum."); 318 #else 319 #ifndef NOSTREAMIO 320 CERR << "libfac: ERROR: not_monic2: case lt is a sum.\n" 321 << errmsg << "\n"; 322 #endif 323 #endif 300 factoryError("libfac: ERROR: not_monic2: case lt is a sum."); 324 301 } 325 302 } … … 425 402 else { 426 403 if ( degree(Extension) == 0 ) FFRandom gen; 427 else { 428 #ifdef HAVE_SINGULAR_ERROR 429 WerrorS("libfac: evaluate: Extension not inFF() or inGF() !"); 430 #else 431 #ifndef NOSTREAMIO 432 CERR << "libfac: evaluate: " << Extension << " not inFF() or inGF() !" 433 << "\n"; 434 #endif 435 #endif 436 FFRandom gen; 404 else 405 { 406 factoryError("libfac: evaluate: Extension not inFF() or inGF() !"); 437 407 } 438 408 } … … 517 487 ok= try_specializePoly(f,minpoly,deg,Substitutionlist,i,j); 518 488 } 519 else { 520 #ifdef HAVE_SINGULAR_ERROR 521 WerrorS("libfac: spezializePoly ERROR: Working over given extension-field not yet implemented!"); 522 #else 523 #ifndef NOSTREAMIO 524 CERR << "libfac: spezializePoly ERROR: Working over given extension-field not yet implemented!\n" 525 << errmsg << "\n"; 526 #endif 527 #endif 489 else 490 { 491 factoryError("libfac: spezializePoly ERROR: Working over given extension-field not yet implemented!"); 528 492 return 0; 529 493 } … … 552 516 553 517 if ( degree(Extension) >0 ) GFRandom gen; 554 else { if ( degree(Extension) == 0 ) FFRandom gen; 555 else { 556 #ifdef HAVE_SINGULAR_ERROR 557 WerrorS("libfac: evaluate: Extension not inFF() or inGF() !"); 558 #else 559 #ifndef NOSTREAMIO 560 CERR << "libfac: evaluate: " << Extension << " not inFF() or inGF() !" 561 << "\n"; 562 #endif 563 #endif 564 FFRandom gen; }} 518 else 519 { 520 if ( degree(Extension) == 0 ) FFRandom gen; 521 else 522 { 523 factoryError("libfac: evaluate: Extension not inFF() or inGF() !"); 524 } 525 } 565 526 REvaluation k(1,n,gen); 566 527 k.nextpoint(); 567 for ( int i=1; i<=maxtries ; i++){ 528 for ( int i=1; i<=maxtries ; i++) 529 { 568 530 // k.nextpoint(); 569 531 SFormList Substitutionlist; … … 572 534 k.nextpoint(); 573 535 CanonicalForm g=substitutePoly(f,Substitutionlist); 574 if ( various_tests(g, degf,1) ){ // found a valid point 536 if ( various_tests(g, degf,1) ) 537 { // found a valid point 575 538 failedfactor = 0; tried += 1; 576 539 if ( degree(Extension) == 0 ) … … 769 732 if (success == 0 ) // No spezialisation could be found 770 733 { 771 #ifdef HAVE_SINGULAR_ERROR 772 WarnS("libfac: Factorize: ERROR: Not able to find a valid specialization!"); 773 #else 774 #ifndef NOSTREAMIO 775 CERR << "libfac: Factorize: ERROR: Not able to find a valid specialization!\n" 776 << errmsg << "\n"; 777 #else 778 ; 779 #endif 780 #endif 734 factoryError("libfac: Factorize: ERROR: Not able to find a valid specialization!"); 781 735 Outputlist.append(CFFactor(F,1)); 782 736 return Outputlist; -
libfac/factor/MVMultiHensel.cc
rc6303a ra13956 26 26 #include "MVMultiHensel.h" 27 27 28 #ifdef SINGULAR29 #define HAVE_SINGULAR_ERROR30 28 #ifndef NOSTREAMIO 31 29 void out_cf(const char *s1,const CanonicalForm &f,const char *s2); 32 30 #endif 33 #endif 34 35 #ifdef HAVE_SINGULAR_ERROR 31 36 32 extern int libfac_interruptflag; 37 extern "C"38 {39 void WerrorS(const char *);40 void Werror(const char *fmt, ...);41 }42 #endif43 33 44 34 #ifdef HENSELDEBUG … … 150 140 if ( (degree(F1,levelU) + degree(F2,levelU) ) <= i ) 151 141 { 152 #ifdef HAVE_SINGULAR_ERROR 153 if (!interrupt_handle()) Werror("libfac: diophant ERROR: degree too large! (%d + %d <= %d)",degree(F1,levelU), degree(F2,levelU), i); 154 //out_cf("F1:",F1,"\n"); 155 //out_cf("F2:",F2,"\n"); 156 #else 157 #ifndef NOSTREAMIO 158 CERR << "libfac: diophant ERROR: degree too large! " 159 << (degree(F1,levelU) + degree(F2,levelU) ) <<"\n"; 160 #else 161 ; 162 #endif 163 #endif 142 if (!interrupt_handle()) factoryError("libfac: diophant ERROR: degree too large!"); /* (%d + %d <= %d)",degree(F1,levelU), degree(F2,levelU), i);*/ 164 143 Retvalue.One=F1;Retvalue.Two=F2; 165 144 return Retvalue; … … 194 173 } 195 174 } 196 #ifdef HAVE_SINGULAR_ERROR 197 if (!interrupt_handle()) WerrorS("libfac: diophant ERROR: F1 and F2 are not relatively prime! "); 198 #ifndef NOSTREAMIO 199 out_cf("F1:",F1,"\n"); 200 out_cf("F2:",F2,"\n"); 201 out_cf("gcd:",r,"\n"); 202 #endif 203 #else 204 #ifndef NOSTREAMIO 205 CERR << "libfac: diophant ERROR: " << F1 << " and " << F2 206 << " are not relatively prime!" << "\n"; 207 #else 208 ; 209 #endif 210 #endif 175 if (!interrupt_handle()) 176 factoryError("libfac: diophant ERROR: F1 and F2 are not relatively prime! "); 211 177 Retvalue.One=s/r;Retvalue.Two=t/r; 212 178 return Retvalue; -
libfac/factor/SqrFree.cc
rc6303a ra13956 27 27 #include "SqrFree.h" 28 28 29 #ifdef SINGULAR30 #define HAVE_SINGULAR_ERROR31 #endif32 33 #ifdef HAVE_SINGULAR_ERROR34 extern "C" { void WerrorS(const char *); }35 #endif36 37 29 #ifdef SQRFREEDEBUG 38 30 # define DEBUGOUTPUT … … 195 187 else return 0 ; 196 188 } 197 #ifdef HAVE_SINGULAR_ERROR 198 WerrorS("libfac: ERROR: SqrFreeTest: we should never fall trough here!"); 199 #else 200 #ifndef NOSTREAMIO 201 CERR << "\nlibfac: ERROR: SqrFreeTest: we should never fall trough here!\n" 202 << errmsg << "\n"; 203 #endif 204 #endif 189 factoryError("libfac: ERROR: SqrFreeTest: we should never fall trough here!"); 205 190 return 0; 206 191 } … … 347 332 return Outputlist ; 348 333 } 349 #ifdef HAVE_SINGULAR_ERROR 350 WerrorS("libfac: ERROR: SqrFreed: we should never fall trough here!"); 351 #else 352 #ifndef NOSTREAMIO 353 CERR << "\nlibfac: ERROR: SqrFreed: we should never fall trough here!\n" 354 << errmsg << "\n"; 355 #endif 356 #endif 334 factoryError("libfac: ERROR: SqrFreed: we should never fall trough here!"); 357 335 DEBDECLEVEL(CERR, "SqrFreed"); 358 336 return Outputlist; // for safety purpose -
libfac/factor/Truefactor.cc
rc6303a ra13956 26 26 #include "Truefactor.h" 27 27 28 #ifdef SINGULAR29 #define HAVE_SINGULAR_ERROR30 #endif31 32 #ifdef HAVE_SINGULAR_ERROR33 extern "C" { void WerrorS(const char *); }34 #endif35 36 28 #ifdef TRUEFACTORDEBUG 37 29 # define DEBUGOUTPUT … … 379 371 if ( PossibleFactors.length() < n ) // a little check 380 372 { 381 #ifdef HAVE_SINGULAR_ERROR 382 WerrorS("libfac: ERROR: TakeNorms less then two items remaining!"); 383 #else 384 #ifndef NOSTREAMIO 385 CERR << "libfac: ERROR: TakeNorms less then two items remaining! " 386 << "\n"; 387 #else 388 ; 389 #endif 390 #endif 373 factoryError("libfac: ERROR: TakeNorms less then two items remaining!"); 391 374 } 392 375 while ( n < PossibleFactors.length() ) … … 432 415 else 433 416 { 434 #ifdef HAVE_SINGULAR_ERROR 435 WerrorS("libfac: TakeNorms: somethings wrong with remaining factors!"); 436 #else 437 #ifndef NOSTREAMIO 438 CERR << "libfac: TakeNorms: somethings wrong with remaining factors!" 439 << "\n"; 440 #endif 441 #endif 417 factoryError("libfac: TakeNorms: somethings wrong with remaining factors!"); 442 418 } 443 419 }
Note: See TracChangeset
for help on using the changeset viewer.