Project

General

Profile

Feature #1227

Updated by John Abbott over 5 years ago

I'd like to use an *@exgcd@* function: one which calculates both the GCD and the corresponding linear combination of the 2 args.

What exactly should this function do? Consider the following session:
<pre>
use P ::= QQ[x,y,z];
f := x+1;
g := x;
exgcd(f,g);
-- what should happen here?
</pre>

Note that @P@ $P$ is not a PID (nor a "Bezout domain"); so in general the Bezout equation has no solution. But with the specific input a solution does exist. Should the call @exgcd(f,g)@$ produce a "not PID" error, or should it actually compute the answer?

Back