hermann on Sat, 23 Dec 2023 22:27:08 +0100


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

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


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.
V=V
$


I know:

? ?bitprecision
bitprecision(x,{n}): if n is present and positive, return x at precision n
bits. If n is omitted, return real precision of object x in bits.

?


How can that fix the loop variable?

$ cat w3.gp
M=[669633542775662994, 32427018822232829389, 1; 32427018822232829389, 1570279089274525638742, 0; 1, 0, 6917529027641082109];
X=2305843009213693950;
forqfvec(v,M,X,if(qfeval(M,v)==X,V=v;break(),print1(".")));
print("V=",V);
$


Regards,

Hermann.