Karim Belabas on Sat, 13 Jul 2019 13:06:26 +0200


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

Re: components of t_PADIC


* Max Alekseyev [2019-07-13 12:58]:
> Karim,
> 
> Thank you for clarification. I was confused about the relativity of
> precision in component(), especially since padicprec() gives the absolute
> precision.
> 
> Your suggestion "x * Mod(1,x.mod)" for conversion does not quite -- for
> x=4+O(2^3) it returns Mod(0,2) while I expect Mod(4,8).

Yeah sorry for the confusion, I normally make sure of handling units and not
carry a useless/expensive valuation along :-). In the general case, it's

  Mod(x, x.p^padicprec(x,x.p))

then, provided valuation(x, x.p) is non-negative [ tested, this time... ]

Cheers,

    K.B.
--
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]
`