Karim BELABAS on Mon, 21 Feb 2000 19:38:47 +0100 (MET)


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

Re: p-adic shift


[Diana Bosio:]
> I am working on p-adic dynamics and would like to use PARI in library
> mode for some of my computations.  One of operations I need to perform
> is a p-adic shift.  I know there is a dyadic shift, I would like to
> know if there is an analogue for p (apart from the obvious division by
> p^n). If not, can I rely on the division by p^n as being exact,
> provided I am in the ideal (p^n)?

Hi,

1) there is no p-adic shift for p > 2.

2) you can rely on gdiv(x, pn) being an integer (t_INT) if pn divides x. It
   will be a t_FRAC otherwise. Also, you can always use divii(x, pn) which
   only computes the euclidean quotient (and will be a bit faster).

3) IF x is of type t_PADIC, then gdiv(x, p) will actually perform a kind of
   p-adic shift (updating valp(x)). BUT padics are a nightmare in terms of
   efficiency so you'll be much bettter off sticking to integers.

Good luck,
 
   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/