Re: mpz_gcd_ext(NULL, ...)

2017-01-10 Thread Marco Bodrato
Ciao. Il Dom, 1 Gennaio 2017 7:30 pm, Niels Möller ha scritto: > "Marco Bodrato" writes: >> While we are looking at gcdext, I propose a small change to save an >> allocation when t must be computed. Can you review it, to check if the >> size assumptions are safe? > I

Re: mpz_gcd_ext(NULL, ...)

2017-01-01 Thread Niels Möller
"Marco Bodrato" writes: > While we are looking at gcdext, I propose a small change to save an > allocation when t must be computed. Can you review it, to check if the > size assumptions are safe? Sorry, I haven't looked too closely at this code... I guess it still

Re: mpz_gcd_ext(NULL, ...)

2016-12-02 Thread Marc Glisse
On Sat, 3 Dec 2016, Marco Bodrato wrote: The modified manual now says that "If @var{s}, @var{t} or @var{g} is @code{NULL} then that value is not computed.", but g is computed anyway, even if it is not returned... The only change is that it is about g, s and t instead of just t. But that was

Re: mpz_gcd_ext(NULL, ...)

2016-12-02 Thread Marco Bodrato
Ciao, Il Ven, 25 Novembre 2016 2:11 pm, Marc Glisse ha scritto: > On Fri, 25 Nov 2016, Niels Möller wrote: > >> Marc Glisse writes: >>> a user was asking if we could support calling mpz_gcd_ext with a NULL >>> first argument (the gcd), since they are only interested in the

Re: mpz_gcd_ext(NULL, ...)

2016-11-25 Thread Torbjörn Granlund
ni...@lysator.liu.se (Niels Möller) writes: www-update failed, though: [nisse@shell /var/hg]$ ./www-update Checking out www. destination directory: www updating to branch default 201 files updated, 0 files merged, 0 files removed, 0 files unresolved Compressing .html

Re: mpz_gcd_ext(NULL, ...)

2016-11-25 Thread Niels Möller
t...@gmplib.org (Torbjörn Granlund) writes: > This sort of things probably below here: > https://gmplib.org/devel/incompatibility.html Done. I also added an entry for _mpz_newalloc, while editing that file. www-update failed, though: [nisse@shell /var/hg]$ ./www-update Checking out www.

Re: mpz_gcd_ext(NULL, ...)

2016-11-25 Thread Niels Möller
t...@gmplib.org (Torbjörn Granlund) writes: > I suppose it also implies a slight computation overhead > to check size + low limb for the return value. Slight enough to be reasonably for the mpz-layer, I think. One could consider doing that only when the gcd pointer is NULL, and otherwise

Re: mpz_gcd_ext(NULL, ...)

2016-11-25 Thread Torbjörn Granlund
ni...@lysator.liu.se (Niels Möller) writes: Sounds reasonable to me. But then I'd also consider adding a return value, returning one if the inputs were coprime (gcd == 1), otherwise zero. Would be useful for mpz_invert. That, unlike the user proposal, is a change which breaks source

Re: mpz_gcd_ext(NULL, ...)

2016-11-25 Thread Marc Glisse
On Fri, 25 Nov 2016, Niels Möller wrote: Marc Glisse writes: a user was asking if we could support calling mpz_gcd_ext with a NULL first argument (the gcd), since they are only interested in the coefficients s and t and would like to save the unnecessary allocation. I

Re: mpz_gcd_ext(NULL, ...)

2016-11-25 Thread Niels Möller
Marc Glisse writes: > a user was asking if we could support calling mpz_gcd_ext with a NULL > first argument (the gcd), since they are only interested in the > coefficients s and t and would like to save the unnecessary > allocation. I doubt it would save that much, but it