Changeset a74143 in git
 Timestamp:
 Jan 6, 2012, 9:47:51 PM (11 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
 Children:
 31f1850ad6697d9acd155b53fa63f9e1a648ed9c
 Parents:
 4b38e3cc9992129dd4ef044c1d2cc7e55f93b134
 gitauthor:
 Oleksandr Motsak <motsak@mathematik.unikl.de>20120106 21:47:51+01:00
 gitcommitter:
 Oleksandr Motsak <motsak@mathematik.unikl.de>20120106 21:59:37+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

libpolys/coeffs/modulop.cc
r4b38e3 ra74143 153 153 154 154 #ifdef HAVE_DIV_MOD 155 155 156 #ifdef USE_NTL_XGCD 157 156 158 //ifdef HAVE_NTL // in ntl.a 157 159 //extern void XGCD(long& d, long& s, long& t, long a, long b); … … 160 162 NTL_CLIENT 161 163 #endif 164 162 165 #endif 163 166 … … 748 751 749 752 750 long nvInvMod(long a, const coeffs R) 751 { 753 inline long nvInvMod(long a, const coeffs R) 754 { 755 #ifdef HAVE_DIV_MOD 756 return InvMod(a, R); 757 #else 758 /// TODO: use "long InvMod(long a, const coeffs R)"?! 759 752 760 long s; 753 761 754 long u, v, u0, v0, u1, v1, u2, v2, q, r; 755 756 u1=1; v1=0; 757 u2=0; v2=1; 758 u = a; v = R>ch; 762 long u, u0, u1, u2, q, r; // v0, v1, v2, 763 764 u1=1; // v1=0; 765 u2=0; // v2=1; 766 u = a; 767 768 long v = R>ch; 759 769 760 770 while (v != 0) … … 765 775 v = r; 766 776 u0 = u2; 767 v0 = v2;768 u2 = 769 v2 = v1 q*v2;777 // v0 = v2; 778 u2 = u1  q*u2; 779 // v2 = v1  q*v2; 770 780 u1 = u0; 771 v1 = v0;781 // v1 = v0; 772 782 } 773 783 … … 777 787 return s + R>ch; 778 788 else 779 return s; 789 return s; 790 #endif 780 791 } 781 792
Note: See TracChangeset
for help on using the changeset viewer.