Ruud H.G. van Tol on Tue, 05 Dec 2023 16:12:11 +0100


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

Re: Normalization of rational functions



On 2023-12-05 15:03, Ruud H.G. van Tol wrote:
On 2023-12-04 04:39, Ilya Zakharevich wrote:
I thought this has been fixed some time ago:

    (19:36) gp > t; (-t0*t^2 + 2*t - t0)/(-t^2 - 1)
    %1 = (-t0*t^2 + 2*t - t0)/(-t^2 - 1)

Should not the normalization choose the positive sign for the
leading(?)  coefficient of the denominator?  (Or at least the
numerator?)

On my 2.15.4 gp-terminal:

? (-t0*t^2 + 2*t - t0)/(-t^2 - 1)
%1 = t0 + 2*t/(-t^2 - 1)

? t=x
%2 = x

? (-t0*t^2 + 2*t - t0)/(-t^2 - 1)
%3 = (-t0*x^2 + 2*x - t0)/(-x^2 - 1)

So to get your exact output:

? t=t
%1 = t

? (-t0*t^2+2*t-t0)/(-t^2-1)
%2 = (-t0*t^2 + 2*t - t0)/(-t^2 - 1)

? type(t)
%3 = "t_POL"

-- Ruud