Changeset 2eeb7d in git
- Timestamp:
- Jul 13, 1999, 6:24:45 PM (24 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- eff050869a8899bcdec83ae6d17706325400e93d
- Parents:
- e202148165f594419822417d29c7ed3dac92e205
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
re20214 r2eeb7d 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.16 0 1999-07-12 18:24:57Singular Exp $ */4 /* $Id: iparith.cc,v 1.161 1999-07-13 16:24:45 Singular Exp $ */ 5 5 6 6 /* … … 5779 5779 break; 5780 5780 } 5781 else if ( strcmp(n, cmds[en].name) == 0)5781 else if ((an!=en) && (strcmp(n, cmds[en].name) == 0)) 5782 5782 { 5783 5783 i=en; … … 5792 5792 if (*n < *(cmds[i].name)) 5793 5793 { 5794 en=i ;5794 en=i-1; 5795 5795 } 5796 5796 else if (*n > *(cmds[i].name)) 5797 5797 { 5798 an=i ;5798 an=i+1; 5799 5799 } 5800 5800 else … … 5803 5803 if(v<0) 5804 5804 { 5805 en=i ;5805 en=i-1; 5806 5806 } 5807 5807 else if(v>0) 5808 5808 { 5809 an=i ;5809 an=i+1; 5810 5810 } 5811 5811 else /*v==0*/ -
Singular/ipshell.cc
re20214 r2eeb7d 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipshell.cc,v 1.4 3 1999-07-05 13:52:06 obachmanExp $ */4 /* $Id: ipshell.cc,v 1.44 1999-07-13 16:24:44 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: … … 33 33 #include "stairc.h" 34 34 #include "ipshell.h" 35 #ifdef HAVE_FACTORY 36 #define SI_DONT_HAVE_GLOBAL_VARS 37 #include <factory.h> 38 #endif 35 39 36 40 leftv iiCurrArgs=NULL; … … 521 525 else if (p < 0) return (-IsPrime(-p)); 522 526 else if (!(p & 1)) return IsPrime(p-1); 527 #ifdef HAVE_FACTORY 528 int a=0; 529 int e=cf_getNumSmallPrimes(); 530 i=e/2; 531 do 532 { 533 if (p==(j=cf_getSmallPrime(i))) return p; 534 if (p<j) e=i-1; 535 else a=i+1; 536 i=a+(e-a)/2; 537 } while ( a<= e); 538 if (p>j) return j; 539 else return cf_getSmallPrime(i-1); 540 #else 523 541 for (j=p/2+1,i=3; i<p; i+=2) 524 542 { … … 527 545 } 528 546 return p; 547 #endif 529 548 } 530 549
Note: See TracChangeset
for help on using the changeset viewer.