| Karim BELABAS on Sat, 7 Sep 2002 23:04:01 +0200 (MEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: polcoeff |
On Sat, 27 Jul 2002, Ilya Zakharevich wrote:
> It looks like polcoeff() is silently converting a rational function
> into a power series. Is it a good thing to do?
No. It is rather obcure, and quite useless since can have Ser() for explicit
conversion. Since this was not documented, I call it a bug.
I have removed that conversion, as I was fixing the
polcoeff(1/x, -3) --> SEGV bug.
> The fact that it *can* operates on power series *is* mentioned in the
> docs, but not in the docs for the function. The fact that it would
> coerce a "wrong" type is not mentioned at all...
I have modified the docs:
(22:04) gp > ??polcoeff
polcoeff(x,s,{v}):
coefficient of degree s of the polynomial x, with respect to the main
variable if v is omitted, with respect to v otherwise. Also applies to power
series, scalars (polynomial of degree 0), and to rational functions provided
the denominator is a monomial.
Karim.
--
Karim Belabas Tel: (+33) (0)1 69 15 57 48
Dép. de Mathematiques, Bat. 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/