| Karim BELABAS on Tue, 26 Nov 2002 16:28:56 +0100 (MET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: polynomial arithmetic feature? |
On Fri, 22 Nov 2002, Michael Somos wrote:
> Forgot to mention that :
>
> ? ( (x+y+1)*z*(x+y)/y ) / ( z*(x+y)/y )
> %1 = x + (y + 1)
> ? \v
> GP/PARI CALCULATOR Version 2.2.4 (development CHANGES-1.491)
> i686 running linux (ix86 kernel) 32-bit version
> (readline v4.2a enabled, extended help not available)
>
> So it seems to be that something changed since then. Probably a
> typo or attempt to fix one thing breaking another. Shalom, Michael
It did not work in 2.2.4 either, but it was well hidden:
(16:15) gp > (x+y+1)*z*(x+y)/y
%1 = z/y*x^2 + ((2*z*y + z)/y)*x + (z*y + z)
(16:15) gp > z*(x+y)/y
%2 = z/y*x + z
(16:15) gp > %1 / %2
%3 = z/z*x + (y + 1)
If the intermediate results of %1 and %2 are not simplified (as in your
direct computation), then the result was correct.
In 2.2.5, in order to fix a "missed simplification" problem, I added calls to
simplify() when simplifying a rational function, applied to numerator and
denominator. Thus exhibiting the bug.
The bug was actually in content( t_RFRAC ), which apparently made the
simplifying assumption that numerator and denominator were polynomials in the
same variable (or scalars) ==> content(y/x) = 1
Should be all right in CVS now.
Karim.
--
Karim Belabas Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425 Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France) http://www.math.u-psud.fr/~belabas/
--
PARI/GP Home Page: http://www.parigp-home.de/