Bill Allombert on Tue, 05 Dec 2023 14:35:04 +0100


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

Re: Normalization of rational functions


On Sun, Dec 03, 2023 at 07:39:16PM -0800, 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?)

This was fixed by Karim some time ago in this commit:

commit 6afc9e9a0492fed89c280388613c247cb501e22b
Author: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
Date:   Sun Oct 23 16:30:41 2022 +0200

    2- normalize t_RFRAC so that leading coeff of denoimator is "positive";

    E.g., [1/(1-x),1/(x-1)].
    Before: %1 = [1/(-x + 1), 1/(x - 1)]
    After:  %1 = [-1/(x - 1), 1/(x - 1)]

Cheers,
Bill.