Changeset f7e671 in git
 Timestamp:
 Nov 24, 2022, 2:36:42 PM (2 months ago)
 Branches:
 (u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
 Children:
 003f7169c5475df2e586ea9697de3901110b362d
 Parents:
 d65cbb52476edc058eb3eb9d38c122de988f2c4c
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

kernel/GBEngine/kstd1.cc
rd65cbb5 rf7e671 2179 2179 /*Shdl=*/initS(F,Q,strat); 2180 2180 if ((strat>ak!=0) 2181 && (strat>kAllAxis)) 2181 && (strat>kAllAxis)) /*never true for ringcf*/ 2182 2182 { 2183 2183 if (strat>ak!=1) 
libpolys/coeffs/rintegers3.cc
rd65cbb5 rf7e671 53 53 StringAppendS(")"); 54 54 #endif 55 nrzTest(x); 55 56 return x; 56 57 } 57 58 58 59 59 staticint nrzSize(number a, const coeffs)60 int nrzSize(number a, const coeffs) 60 61 { 61 62 if (a==INT_TO_SR(0)) return 0; … … 141 142 } 142 143 143 144 144 static long int_gcd(long a, long b) 145 145 { … … 155 155 b = r; 156 156 } while (b); 157 return ABS(a); // % in c doeas not imply a signn157 return ABS(a); // % in C does not imply a sign 158 158 // it would be unlikely to see a negative here 159 159 // but who knows … … 195 195 } 196 196 } 197 nrzTest((number)erg); 197 198 return (number) erg; 198 199 } … … 203 204 mpz_ptr erg = (mpz_ptr) omAllocBin(gmp_nrz_bin); 204 205 mpz_init_set(erg, (mpz_ptr) a); 206 nrzTest((number)erg); 205 207 return (number) erg; 206 208 } … … 236 238 mpz_init(erg); 237 239 mpz_gcd(erg, (mpz_ptr) a, (mpz_ptr) b); 240 nrzTest((number)erg); 238 241 return (number) erg; 239 242 } … … 489 492 mpz_clear(rr); 490 493 } 491 qq=nrz_short(qq);492 nrzTest( (number)qq);493 return (number) qq;494 number res=nrz_short((number)qq); 495 nrzTest(res); 496 return res; 494 497 } 495 498 … … 526 529 527 530 528 staticvoid nrzDelete(number *a, const coeffs)531 void nrzDelete(number *a, const coeffs) 529 532 { 530 533 if (*a == NULL) return; … … 742 745 } 743 746 744 static number nrzDiv (number a,number b, const coeffs )747 static number nrzDiv (number a,number b, const coeffs cf) 745 748 { 746 749 assume(SR_TO_INT(b)); 747 if (nrzIsZero(b ))750 if (nrzIsZero(b,cf)) 748 751 { 749 752 WerrorS(nDivBy0); … … 812 815 } 813 816 814 static number nrzExactDiv (number a,number b, const coeffs )817 static number nrzExactDiv (number a,number b, const coeffs cf) 815 818 { 816 819 assume(SR_TO_INT(b)); 817 820 mpz_t aa, bb; 818 if (nrzIsZero(b ))821 if (nrzIsZero(b,cf)) 819 822 { 820 823 WerrorS(nDivBy0); … … 834 837 mpz_clear(aa); 835 838 mpz_clear(bb); 836 nrzTest((number)erg); 837 return (number) erg; 839 return nrz_short((number) erg); 838 840 } 839 841 … … 950 952 nrzDelete(&a1, R); 951 953 nrzDelete(&b1, R); 954 nrzTest(ab); 952 955 return ab; 953 956 } … … 1013 1016 } 1014 1017 1015 1016 /*1017 * set the exponent (allocate and init tables) (TODO)1018 */1019 1020 void nrzSetExp(int, coeffs)1021 {1022 }1023 1024 void nrzInitExp(int, coeffs)1025 {1026 }1027 1018 1028 1019 #ifdef LDEBUG … … 1154 1145 else 1155 1146 mpz_init_set(res, (mpz_ptr) a); 1147 } 1148 1149 static number nrzEucNorm (number a, const coeffs ) 1150 { 1151 if (n_Z_IS_SMALL(a)) 1152 { 1153 long aa=ABS(SR_TO_INT(a)); 1154 return INT_TO_SR(aa); 1155 } 1156 else 1157 { 1158 mpz_ptr abs = (mpz_ptr) omAllocBin(gmp_nrz_bin); 1159 mpz_init(abs); 1160 mpz_abs(abs, (mpz_ptr)a); 1161 nrzTest((number)abs); 1162 return (number) abs; 1163 } 1156 1164 } 1157 1165 … … 1208 1216 r>cfXExtGcd = nrzXExtGcd; // only for ring stuff 1209 1217 r>cfEucNorm = nrzEucNorm; 1210 r>cfQuotRem = nrz SmallestQuotRem;1218 r>cfQuotRem = nrzQuotRem; 1211 1219 r>cfDivBy = nrzDivBy; // only for ring stuff 1212 1220 //#endif
Note: See TracChangeset
for help on using the changeset viewer.