Karim BELABAS on Thu, 5 Sep 2002 18:50:20 +0200 (MEST)


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

Re: hilbert


On Sun, 1 Sep 2002, Martin Bright wrote:
> Can somebody explain to me the behaviour of hilbert()?
>
> ? hilbert(-1+O(2^4),12+O(2^4))
> %1 = -1
>
> Correct.
>
> ? hilbert(Mod(-1,16),Mod(12,16))
> %2 = 1
> Why is this different?

The documentation needs to be fixed.
hilbert() assumes that an input INTMOD has _prime_ modulus.

> ? hilbert(-1+O(2^3),12+O(2^3))
> %3 = 1
>
> But there's not enough precision in 12+O(2^3) to be able to calculate the
> Hilbert symbol.

This is a bug, the original author forgot the special case p = 2 for the
case hilbert(PADIC, PADIC).

After a quick code review, there were (at least) two other typos:

. hilbert(INTMOD,*):
(18:25) gp > hilbert(Mod(1,2), y)
  ***   bug in GP (Segmentation Fault), please report

. hilbert(INT,PADIC):
(18:25) gp > hilbert(-1, 12+O(2^4))
  ***   insufficient precision for p=2 in hilbert

Everything is fixed in CVS (both stable and unstable).

Thanks for the bug report !

    Karim.
-- 
Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathematiques, Bat. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas/
--
PARI/GP Home Page: http://www.parigp-home.de/