On 05/16/2008 02:28 AM, Bill Page wrote:
> On Wed, May 14, 2008 at 5:04 PM, Ralf Hemmecke wrote:
>> To me the problem is bad design.
>>
>> halfExtendedSubResultantGcd1 and
>> halfExtendedSubResultantGcd2 could well have returned the
>> same type Record(gcd: P, coef: P). By the name of the function
>> it would have been clear how to interpret the coef entry.
>>
>> In fact, I would rather have liked that both functions simply return
>> a multivalue or a Cross(P, P), but unfortunately, that does not
>> work in panAxiom.
> 
> What is a "multivalue"? Is it a type in Aldor?

Search for "multiple value" in the AUG.

> So in Axiom one must write a slightly more awkward expression:
> 
>   g := if mdeg p < mdeg ts_v
>         then (x+->gcd(x.gcd,x.coef2))(halfExtendedSubResultantGcd2(ts_v,p)$P)
>         else (x+->gcd(x.gcd,x.coef1))(halfExtendedSubResultantGcd1(p,ts_v)$P)
> 
> where the anonymous function untangles the record as inputs. It is not
> necessary that 'halfExtendedSubResultantGcd1' and
> 'halfExtendedSubResultantGcd2' return the same type.

That looks a bit more ugly, but nice to know that this works. Thanks.

Ralf

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to