Dirk Laurie on Mon, 29 Oct 2018 11:08:03 +0100


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

Re: bug? (1/13+O(10^2))^(1/3) triggers an endless loop


One can do the computation itself this way:

? chinese( Mod((1/13+O(5^2))^(1/3),5^2), Mod((1/13+O(2^2))^(1/3),2^2))
%1 = Mod(53, 100)

Op Ma., 29 Okt. 2018 om 11:08 het Karim Belabas
<Karim.Belabas@math.u-bordeaux.fr> geskryf:
>
> * Joerg Arndt [2018-10-29 09:05]:
> > The following input appears to take forever:
> > (1/13+O(10^2))^(1/3)
>
> This is expected, n-adics for non prime n are not supported (although a few
> trivial operations will actually work) :
>
> (10:04) gp > ??t_PADIC
> p-adic numbers (t_PADIC)::
>
>    Typing O(p^k),  where p is a prime and k is an integer, yields a p-adic 0 of
> accuracy k, representing any p-adic number whose valuation is >= k. [...]
>
>    Note  that  it  is  not  checked  whether  p is indeed prime but results are
> undefined if this is not the case: you can try to work on 10-adics if you want,
> but  disasters  will  happen  as  soon  as  you do something non-trivial.
>
>
> 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]
> `
>