Thread: LLL in GP/Pari View Single Post
2015-11-17, 13:01   #2
WraithX

Mar 2006

1D916 Posts

Quote:
 Originally Posted by paul0 I'm trying the qflll function Pari for lattice reduction. However, I'm not getting correct answers. First, the wikipedia example: https://en.wikipedia.org/wiki/Lenstr...tion_algorithm Code: (20:32) gp > qflll([1,-1,3;1,0,5;1,2,6]) %50 = [-4 5 0] [-1 1 1] [ 1 -1 0] As you can see, both results are incorrect. What am I doing wrong?
Be sure to check the built-in documentation for what a function does, using either ?<func> or ??<func>:
Code:
?qflll
qflll(x,{flag=0}): LLL reduction of the vectors forming the matrix x (gives the
unimodular transformation matrix T such that x*T is LLL-reduced). flag is...
Doing the following works:
Code:
(06:54) gp > x=[1,-1,3;1,0,5;1,2,6]
%1 =
[1 -1 3]
[1  0 5]
[1  2 6]

(06:54) gp > qflll(x)
%2 =
[-4  5 0]
[-1  1 1]
[ 1 -1 0]

(06:54) gp > x*qflll(x)
%3 =
[0 1 -1]
[1 0  0]
[0 1  2]