Changeset 48eb34 in git
 Timestamp:
 Apr 3, 2018, 2:50:32 PM (5 years ago)
 Branches:
 (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
 Children:
 414cce519189e70ffda5ff4b972038335e5df374
 Parents:
 891f0edafd7f89cbc1574615217411372828de84
 gitauthor:
 Hans Schoenemann <hannes@mathematik.unikl.de>20180403 14:50:32+02:00
 gitcommitter:
 Hans Schoenemann <hannes@mathematik.unikl.de>20180403 14:52:50+02:00
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

libpolys/coeffs/modulop.cc
r891f0e r48eb34 41 41 void npCoeffWrite (const coeffs r, BOOLEAN details); 42 42 const char * npRead (const char *s, number *a,const coeffs r); 43 void nvInpMult(number &a, number b, const coeffs r); 43 44 44 45 #ifdef LDEBUG … … 509 510 //r>cfName = ndName; 510 511 //r>cfInpMult=ndInpMult; 512 r>convSingNFactoryN=npConvSingNFactoryN; 513 r>convFactoryNSingN=npConvFactoryNSingN; 514 r>cfRandom=npRandom; 515 #ifdef LDEBUG 516 // debug stuff 517 r>cfDBTest=npDBTest; 518 #endif 519 511 520 #ifdef NV_OPS 512 521 if (c>NV_MAX_PRIME) … … 523 532 } 524 533 #endif 525 #ifdef LDEBUG526 // debug stuff527 r>cfDBTest=npDBTest;528 #endif529 530 r>convSingNFactoryN=npConvSingNFactoryN;531 r>convFactoryNSingN=npConvFactoryNSingN;532 533 r>cfRandom=npRandom;534 534 535 535 // io via ssi … … 547 547 #endif 548 548 { 549 #if !defined(HAVE_DIV_MOD)  !defined(HAVE_MULT_MOD) 550 r>npExpTable=(unsigned short *)omAlloc( r>ch*sizeof(unsigned short) ); 551 r>npLogTable=(unsigned short *)omAlloc( r>ch*sizeof(unsigned short) ); 549 #ifdef HAVE_DIV_MOD 550 r>npInvTable=(unsigned short*)omAlloc0( r>ch*sizeof(unsigned short) ); 551 #elif !defined(HAVE_MULT_MOD) 552 r>npExpTable=(unsigned short *)omAlloc0( r>ch*sizeof(unsigned short) ); 553 r>npLogTable=(unsigned short *)omAlloc0( r>ch*sizeof(unsigned short) ); 552 554 r>npExpTable[0] = 1; 553 555 r>npLogTable[0] = 0; … … 578 580 } 579 581 #endif 580 #ifdef HAVE_DIV_MOD 581 r>npInvTable=(unsigned short*)omAlloc0( r>ch*sizeof(unsigned short) ); 582 #endif 583 } 582 } 583 #ifdef NV_OPS 584 else /*if (c>NV_MAX_PRIME)*/ 585 { 586 r>cfMult = nvMult; 587 r>cfDiv = nvDiv; 588 r>cfExactDiv = nvDiv; 589 r>cfInvers = nvInvers; 590 r>cfInpMult = nvInpMult; 591 //r>cfPower= nvPower; 592 //if (c>FACTORY_MAX_PRIME) // factory will catch this error 593 //{ 594 // r>convSingNFactoryN=ndConvSingNFactoryN; 595 //} 596 } 597 #endif 584 598 return FALSE; 585 599 } … … 780 794 } 781 795 782 void 796 void nvInpMult(number &a, number b, const coeffs r) 783 797 { 784 798 number n=nvMultM(a,b,r); 785 799 a=n; 786 800 } 787 788 801 789 802 static inline long nvInvMod(long a, const coeffs R) 
libpolys/coeffs/modulop.h
r891f0e r48eb34 56 56 { 57 57 long x = (long)r>npLogTable[(long)a]+ r>npLogTable[(long)b]; 58 return (number)(long)r>npExpTable[x< r>npPminus1M ? x : x r>npPminus1M];58 return (number)(long)r>npExpTable[x<=r>npPminus1M ? x : x r>npPminus1M]; 59 59 } 60 60 static inline void npInpMultM(number &a, number b, const coeffs r) 61 61 { 62 62 long x = (long)r>npLogTable[(long)a]+ r>npLogTable[(long)b]; 63 a=(number)(long)r>npExpTable[x< r>npPminus1M ? x : x r>npPminus1M];63 a=(number)(long)r>npExpTable[x<=r>npPminus1M ? x : x r>npPminus1M]; 64 64 } 65 65 #endif 
omalloc/omDebugCheck.c
r891f0e r48eb34 410 410 om_CallErrorHook = 1; 411 411 412 if ( error!=omError_NotBinAddr)412 if ((error!=omError_NotBinAddr)&&(error!=omError_FreedAddr)) 413 413 _omPrintAddrInfo(stderr, error, addr, bin_size, flags, 10, " occurred for"); 414 414 om_Opts.ErrorHook();
Note: See TracChangeset
for help on using the changeset viewer.