Karim Belabas on Mon, 29 Oct 2018 10:08:35 +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


* 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]
`