Changeset 1950d7 in git
- Timestamp:
- Oct 28, 2020, 12:51:54 PM (3 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 2694e4bb422106b6c10873c2b061ad87b870f453
- Parents:
- 0a6f360449d9d3f50e2f00fcff58bd71f9c1917c
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipshell.cc
r0a6f36 r1950d7 1838 1838 LL->Init(2); 1839 1839 LL->m[0].rtyp=BIGINT_CMD; 1840 LL->m[0].data=n lMapGMP((number) C->modBase, C, coeffs_BIGINT);1840 LL->m[0].data=n_InitMPZ( C->modBase, coeffs_BIGINT); 1841 1841 LL->m[1].rtyp=INT_CMD; 1842 1842 LL->m[1].data=(void *) C->modExponent; … … 1867 1867 LL->Init(2); 1868 1868 LL->m[0].rtyp=BIGINT_CMD; 1869 LL->m[0].data=n lMapGMP((number) R->cf->modBase, R->cf, R->cf); // TODO: what is this?? // extern number nlMapGMP(number from, const coeffs src, const coeffs dst); // FIXME: replace with n_InitMPZ(R->cf->modBase, coeffs_BIGINT); ?1869 LL->m[0].data=n_InitMPZ( R->cf->modBase, R->cf); 1870 1870 LL->m[1].rtyp=INT_CMD; 1871 1871 LL->m[1].data=(void *) R->cf->modExponent; … … 5837 5837 { 5838 5838 number p=(number)pnn->next->CopyD(); 5839 nlGMP(p,modBase,coeffs_BIGINT); // TODO? // extern void nlGMP(number &i, mpz_t n, const coeffs r); // FIXME: n_MPZ( modBase, p, coeffs_BIGINT); ? 5839 n_MPZ(modBase,p,coeffs_BIGINT); 5840 5840 n_Delete(&p,coeffs_BIGINT); 5841 5841 } -
Singular/number2.cc
r0a6f36 r1950d7 4 4 #include "coeffs/rmodulon.h" // ZnmInfo 5 5 #include "coeffs/bigintmat.h" // bigintmat 6 #include "coeffs/longrat.h" // BIGINTs: nl GMP6 #include "coeffs/longrat.h" // BIGINTs: nlMPZ 7 7 #include "polys/ext_fields/algext.h" // AlgExtInfo 8 8 #include "misc/prime.h" // IsPrime … … 94 94 ZnmInfo info; 95 95 mpz_t modBase; 96 mpz_init(modBase); 97 nlGMP(i2,modBase,coeffs_BIGINT); // FIXME? TODO? // extern void nlGMP(number &i, mpz_t n, const coeffs r); // to be replaced with n_MPZ(modBase,i2,coeffs_BIGINT); // ? 96 nlMPZ(modBase,i2,coeffs_BIGINT); 98 97 info.base= (mpz_ptr)modBase; 99 98 info.exp= 1; -
libpolys/coeffs/longrat.cc
r0a6f36 r1950d7 63 63 number nlBigInt(number &n); 64 64 65 #ifdef HAVE_RINGS66 number nlMapGMP(number from, const coeffs src, const coeffs dst);67 #endif68 69 65 BOOLEAN nlGreaterZero(number za, const coeffs r); 70 66 number nlInvers(number a, const coeffs r); … … 166 162 } 167 163 164 static number nlInitMPZ(mpz_t m, const coeffs) 165 { 166 number z = ALLOC_RNUMBER(); 167 z->s = 3; 168 #ifdef LDEBUG 169 z->debug=123456; 170 #endif 171 mpz_init_set(z->z, m); 172 z=nlShort3(z); 173 return z; 174 } 168 175 169 176 #if (__GNU_MP_VERSION*10+__GNU_MP_VERSION_MINOR < 31) … … 197 204 * convert from a GMP integer 198 205 */ 199 number nlMapGMP(number from, const coeffs /*src*/, const coeffs /*dst*/) 200 { 201 number z=ALLOC_RNUMBER(); 202 #if defined(LDEBUG) 203 z->debug=123456; 204 #endif 205 mpz_init_set(z->z,(mpz_ptr) from); 206 z->s = 3; 207 z=nlShort3(z); 208 return z; 206 static inline number nlMapGMP(number from, const coeffs /*src*/, const coeffs dst) 207 { 208 return nlInitMPZ((mpz_ptr)from,dst); 209 209 } 210 210 … … 215 215 return from; 216 216 } 217 return nl MapGMP(from,src,dst);217 return nlInitMPZ((mpz_ptr)from,dst); 218 218 } 219 219 … … 503 503 } 504 504 505 #ifndef P_NUMBERS_H506 507 static number nlInitMPZ(mpz_t m, const coeffs)508 {509 number z = ALLOC_RNUMBER();510 z->s = 3;511 #ifdef LDEBUG512 z->debug=123456;513 #endif514 mpz_init_set(z->z, m);515 z=nlShort3(z);516 return z;517 }518 #endif519 505 520 506 static number nlMapC(number from, const coeffs src, const coeffs dst) -
libpolys/coeffs/longrat.h
r0a6f36 r1950d7 119 119 number nlInit2gmp (mpz_t i, mpz_t j, const coeffs r); 120 120 121 // FIXME: TODO: why only if HAVE_RINGS? bug? 122 # ifdef HAVE_RINGS 123 void nlGMP(number &i, mpz_t n, const coeffs r); // to be replaced with n_MPZ(number n, number &i,const coeffs r)??? 124 number nlMapGMP(number from, const coeffs src, const coeffs dst); 125 # endif 121 #if 0 // substituted by nlMPZ 122 void nlGMP(number &i, mpz_t n, const coeffs r); 123 #endif 126 124 // for ring similiar to Q/Z (char 0 required): 127 125 number nlChineseRemainderSym(number *x, number *q,int rl, BOOLEAN sym, CFArray &inv_cache,const coeffs CF); -
libpolys/coeffs/rintegers2.cc
r0a6f36 r1950d7 361 361 mpz_ptr erg = (mpz_ptr) omAllocBin(gmp_nrz_bin); 362 362 mpz_init(erg); 363 nl GMP(from, erg, src); // FIXME? TODO? // extern void nlGMP(number &i, number n, const coeffs r); // to be replaced with n_MPZ(erg, from, src); // ?363 nlMPZ(erg, from, src); 364 364 return (number) erg; 365 365 } -
libpolys/coeffs/rmodulo2m.cc
r0a6f36 r1950d7 635 635 { 636 636 mpz_ptr gmp = (mpz_ptr)omAllocBin(gmp_nrz_bin); 637 mpz_init(gmp); 638 nlGMP(from, gmp, src); // FIXME? TODO? // extern void nlGMP(number &i, number n, const coeffs r); // to be replaced with n_MPZ(erg, from, src); // ? 637 nlMPZ(gmp, from, src); 639 638 number res=nr2mMapGMP((number)gmp,src,dst); 640 639 mpz_clear(gmp); omFree((ADDRESS)gmp); -
libpolys/coeffs/rmodulon.cc
r0a6f36 r1950d7 711 711 { 712 712 mpz_ptr erg = (mpz_ptr)omAllocBin(gmp_nrz_bin); 713 mpz_init(erg); 714 nlGMP(from, erg, src); // FIXME? TODO? // extern void nlGMP(number &i, number n, const coeffs r); // to be replaced with n_MPZ(erg, from, src); // ? 713 nlMPZ(erg, from, src); 715 714 mpz_mod(erg, erg, dst->modNumber); 716 715 return (number)erg;
Note: See TracChangeset
for help on using the changeset viewer.