Karim BELABAS on Tue, 16 Nov 1999 19:20:36 +0100 (MET)


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

Re: ceil() bug?


[Michael Somos]
> gp> ceil(sum(n=-5,5,x^n))
> %1 = x^5 + x^4 + x^3 + x^2 + x + 1
> gp> ??ceil
> ceil(x):
> 
>    ceiling  of x.   When x is in R,  the result is the smallest integer
>    greater than or equal to x.
> 
>    The library syntax is gceil(x).
> 
> Notice that the negative powers of x are removed. This behavior seems
> not to be documented. Is this a bug?

by omission. I completed the docs:

(19:18) gp > ??ceil
ceil(x):

   ceiling of x.   When x is in R, the result is the smallest integer greater
than  or  equal  to x.   Applied to a rational function,  ceil(x) returns the
euclidian quotient of the numerator by the denominator.

   The library syntax is gceil(x).

Karim.
__
Karim Belabas                    email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud             Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France)           Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://hasse.mathematik.tu-muenchen.de/ntsw/pari/