> < ^ Date: Sun, 17 Apr 1994 20:34:00 +0200
> < ^ From: Harald Boegeholz <hwb@ix.de >
> ^ Subject: suggestion: fix for Gcd(0*q,0*q)

Hello!

While computing some Gcds in LaurentPolynomialRing(Rationals) I
noticed that Gcd(0*q,0*q) (where q=Indeterminate(Rationals) causes an
error. The reason is that
FieldLaurentPolynomialRingOps.StandardAssociate doesn't work for the 0
polynomial.

I therefore suggest the following changes to gap/lib/polyfld.g
(analogous to PolynomialRingOps.StandardAssociate):

```*** polyfld.g   Tue Nov 09 00:54:00 1993
--- ../polyfld.g        Sun Apr 17 17:53:12 1994
***************
*** 53,59 ****
#F  FieldPolynomialRingOps.StandardAssociate( <R>, <f> )  . . . .  normed pol
##
FieldPolynomialRingOps.StandardAssociate := function( R, f )
!     return f * f.coefficients[ Length( f.coefficients ) ]^-1;
end;

--- 53,63 ----
#F  FieldPolynomialRingOps.StandardAssociate( <R>, <f> )  . . . .  normed pol
##
FieldPolynomialRingOps.StandardAssociate := function( R, f )
!     if 0 < Length( f.coefficients ) then
!         return f * f.coefficients[ Length( f.coefficients ) ]^-1;
!     else
!         return f;
!     fi;
end;

***************
*** 228,236 ****
##
FieldLaurentPolynomialRingOps.StandardAssociate := function( R, f )
local   l;
!
!     l := f.coefficients[Length(f.coefficients)];
!     return Polynomial( R.baseRing, f.coefficients*l^-1 );
end;

--- 232,244 ----
##
FieldLaurentPolynomialRingOps.StandardAssociate := function( R, f )
local   l;
!
!     if 0 < Length( f.coefficients ) then
!         l := f.coefficients[Length(f.coefficients)];
!         return Polynomial( R.baseRing, f.coefficients*l^-1 );
!     else
!         return f;
!     fi;
end;
```

--
Harald Boegeholz | hwb@mathematik.uni-stuttgart.de
| os2a@info2.rus.uni-stuttgart.de

> < [top]