Aurel Page on Thu, 21 Dec 2023 09:03:06 +0100


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

Re: Precision too low in bnfisprincipal


I replied too quickly, your powering was incorrect:
? bnfisprincipal(bnf, idealpow(bnf,bnf.gen[1],9), 1)
%7 = [[0]~, [22, 1]~]

Cheers,
Aurel

On 21/12/2023 09:00, Aurel Page wrote:
Hi Gareth,

You have to use flag=2 or flag=4 in bnfisprincipal, see ?bnfisprincipal.

? \p 20000
? bnf = bnfinit(x^2+199,1);
? bnfisprincipal(bnf, bnf.gen[1]^9)
  *** bnfisprincipal: Warning: precision too low for generators, not given.
% = [[1]~, []~]
? bnfisprincipal(bnf, bnf.gen[1]^9, 2)
% = [1]~
? bnfisprincipal(bnf, bnf.gen[1]^9, 4)
% = [[1]~, matrix(0,2)]

Best,
Aurel

On 21/12/2023 08:02, Gareth Ma wrote:

Sorry, I accidentally hit sent. Here is the code and output again:

? \p 20000     
? bnf = bnfinit(x^2 + 199, flag=1);
? bnfisprincipal(bnf, bnf.gen[1] ^ 9)
  *** bnfisprincipal: Warning: precision too low for generators, not given.
%10 = [[1]~, []~]

I can reproduce this on the browser version too. I am not sure what is happening or how to fix it. Should I raise the precision even higher? Is this intended?

Best regards,

Gareth

On 21/12/2023 06:58, Gareth Ma wrote:
Hi all. I am trying to use `bnfisprincipal`, but it is somehow failing even for very small inputs. Here is an example:

default(realprecision, 2000);

bnf = bnfinit(x^2 + 199, flag=1)bnfisprincipal(bnf, bnf.gen[1] ^ 9)
  *** bnfisprincipal: Warning: precision too low for generators, not given.
%7 = [[1]~, []~]