Bill Allombert on Wed, 03 Oct 2018 18:31:50 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: vector version of gcdext?


On Wed, Oct 03, 2018 at 04:47:40PM +0100, J E Cremona wrote:
> The function gcd() allows 2 inputs as in gcd(2,3) or a vector of inputs as
> in gcd([6,10,15]),  but the extended version only allows the first form.
> It would not be hard to write an extended vector version (and I can of
> course write my own) -- feature request?

Hello John,

The issue is that there are several solutions and no obvious canonical
ones in that case. What would your extended vector version do ?

Sometime we want small solutions, in which case a LLL based solution is
better, and often we want the dual of gcdext, that is:
given p_1...p_n, find a_1...a_n such that

\sum a_i\*\prod_{i \neq j} p_j = 1

(that is a_i = delta_i,j [mod p_j])

Cheers,
Bill.