hermann on Sun, 24 Dec 2023 08:05:48 +0100


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

Re: How to deal with "precision too low in forqfvec" ?


On 2023-12-23 22:48, Bill Allombert wrote:
On Sat, Dec 23, 2023 at 10:27:02PM +0100, hermann@stamm-wilbrandt.de wrote:
Below script results in this error:

$ gp -q < w3.gp
  ***   at top-level: forqfvec(v,M,X,if(qfeval(M,v)==X,V=v;break(),p
  ***                                          ^---------------------
  ***   precision too low in forqfvec.

How can that fix the loop variable?

You cannot... The large precision variant of forqfvec has not been implemented
yet. (This is the variant corresponding to qfminim(,,,2)).

We have plan to implement it, though.

Cheers,
Bill

Thanks,

I used this function as workaround based on you "qfminim(,,,2)" remark.
I get farther than before, but with parisizemax=24G run out of memory for bigger numbers:

vfirst(M,x)={
  v=qfminim(M,x,1,2)[3];
  if(qfeval(M,v[,1])==x,return(v[,1]));
  for(e=1,oo,
    [n,m,v]=qfminim(M,x,2^e,2);
    for(i=n/4+1,n/2,
      if(qfeval(M,v[,i])==x,print("i=",i);return(v[,i]))));
}


From qfminim help:

? ?qfminim
qfminim(x,{B},{m},{flag=0}): x being a square and symmetric matrix representing a positive definite quadratic form, this function deals with the vectors of x
whose norm is less than or equal to B, enumerated using the Fincke-Pohst
algorithm, storing at most m vectors (no limit if m is omitted).
... 1: ignores m and returns the first vector whose norm is less than B. ...

?


vfirst() returns the first vector with norm equal to x.
There is no qfminim() equivalent option as flag=1 returns a vector less than B.

What I need is large precision variant returning first vector equals B, not less.

This is for an application where I don't know any vector v with qfeval(M,v)==B unlike Dirichlet construction (but know that such a vector exists by construction).

Regards,

Hermann.