Karim Belabas on Wed, 14 Feb 2018 09:05:22 +0100


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

Re: polrecip for a constant polymomial


Fixed in 'master'. Thanks for the report !

Cheers,

    K.B.

* Dirk Laurie [2018-02-14 05:43]:
> It is not merely inconvenient, it is inconsistent and may even qualify
> as being a bug.
> 
> Surely the definition of polrecip should be equivalent to
> 
>    polrecip(p) = subst(p,x,1/x)*x^poldegree(p)
> 
> 2018-02-14 0:41 GMT+02:00 Jacques Gélinas <jacquesg00@hotmail.com>:
> > It is inconvenient to have to add code to handle constant polynomials.
> > Why not return the constant itself ?
> >
> > # polrecip(2+0*x)
> > %1 = 2
> > # polrecip(2)
> >   ***   at top-level: polrecip(2)
> >   ***                          ^-----------
> >   *** polrecip: incorrect type in polrecip (t_INT).
> >
> > Jacques Gélinas, Ottawa
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux         Fax: (+33) (0)5 40 00 21 23
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]
`