John Cremona on Tue, 17 Jun 2014 10:27:44 +0200


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

precision problem in nffactor


In 2.7.1 I see this:

? nffactor(nfinit(y^2 - 22), Mod(1, y^2 - 22)*x^2 +
Mod(926246528884912528275985458927067632*y -
4344481316563541186659879867597013188, y^2 - 22))
  ***   at top-level: nffactor(nfinit(y^2-
  ***                 ^--------------------
  *** nffactor: the PARI stack overflows !
  current stack size: 8000000 (7.629 Mbytes)
  [hint] you can increase GP stack with allocatemem()

but increasing the precision makes the problem go away:

? \p 100
   realprecision = 115 significant digits (100 digits displayed)
? nffactor(nfinit(y^2 - 22), Mod(1, y^2 - 22)*x^2 +
Mod(926246528884912528275985458927067632*y -
4344481316563541186659879867597013188, y^2 - 22))
%1 =
[x + Mod(-314226370217524044*y + 1473852319020386314, y^2 - 22) 1]

[ x + Mod(314226370217524044*y - 1473852319020386314, y^2 - 22) 1]


so it does not seem like a memory issue at all.  Surely with exact
input and output the user should not have to think about internal
working precision?

[This arose while computing the torsion subgroup of an elliptic curve
over Q(sqrt(22)), where one needs to take square roots of number field
elements.]

John