Ciao! A comment about roinit...
Il Sab, 23 Febbraio 2013 5:45 pm, Niels Möller ha scritto: > +mpz_srcptr > +mpz_roinit_n (mpz_ptr x, mp_srcptr xp, mp_size_t xs) > +{ > + ALLOC (x) = 0; > + SIZ (x) = xs; > + PTR (x) = xp; > + return x; > +} This function trusts the caller with regards to normalisation. I'm not sure I like this. I think we should: - normalize (same code as mpz_limbs_finish) before setting SIZ, or - add an ASSERT (xs == 0 || xp[ABS (xs)] != 0), and add a "normalize" function or macro to the documented interface. Regards, m -- http://bodrato.it/papers/ _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org http://gmplib.org/mailman/listinfo/gmp-devel