Changeset d22092f in git


Ignore:
Timestamp:
Jan 13, 2017, 6:55:16 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5bec8f88c9ee2573d328cf7c3aff2bcb301d2395')
Children:
e85feda0c40361dfe1754b7c0fa791e33c600e71f22f22a625c09743d75f7358aecdd7eb5411298a
Parents:
f0bd4cf28bbb221bfdd95862537792a67c30ef12
Message:
ZZ: represention via longrat
Location:
libpolys/coeffs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/rintegers.cc

    rf0bd4c rd22092f  
    159159{
    160160  if (a == NULL) return 0;
    161   return ((mpz_ptr)a)->_mp_alloc;
     161  return ABS(((mpz_ptr)a)->_mp_size);
    162162}
    163163
  • libpolys/coeffs/rmodulon.cc

    rf0bd4c rd22092f  
    686686}
    687687
     688static number nrnMapQ(number from, const coeffs src, const coeffs dst)
     689{
     690  mpz_ptr erg = (mpz_ptr)omAllocBin(gmp_nrz_bin);
     691  mpz_init(erg);
     692  nlGMP(from, (number)erg, src); // FIXME? TODO? // extern void   nlGMP(number &i, number n, const coeffs r); // to be replaced with n_MPZ(erg, from, src); // ?
     693  mpz_mod(erg, erg, dst->modNumber);
     694  return (number)erg;
     695}
     696
    688697#if SI_INTEGER_VARIANT==3
    689698static number nrnMapZ(number from, const coeffs /*src*/, const coeffs dst)
     
    715724#endif
    716725#if SI_INTEGER_VARIANT!=2
    717 static void nrnWrite (number a, const coeffs)
     726void nrnWrite (number a, const coeffs)
    718727{
    719728  char *s,*z;
     
    732741}
    733742#endif
    734 
    735 static number nrnMapQ(number from, const coeffs src, const coeffs dst)
    736 {
    737   mpz_ptr erg = (mpz_ptr)omAllocBin(gmp_nrz_bin);
    738   mpz_init(erg);
    739   nlGMP(from, (number)erg, src); // FIXME? TODO? // extern void   nlGMP(number &i, number n, const coeffs r); // to be replaced with n_MPZ(erg, from, src); // ?
    740   mpz_mod(erg, erg, dst->modNumber);
    741   return (number)erg;
    742 }
    743743
    744744nMapFunc nrnSetMap(const coeffs src, const coeffs dst)
Note: See TracChangeset for help on using the changeset viewer.