mersenneforum.org LLL in GP/Pari
 Register FAQ Search Today's Posts Mark Forums Read

 2015-11-17, 12:35 #1 paul0   Sep 2011 5710 Posts LLL in GP/Pari 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] Second, the matlab example: http://www.mathworks.com/help/symboloddslotic/mupad_ref/lllint.html Code: (20:32) gp > qflll([1, 2, 3;4, 5, 6]) %51 = [-1 4] [ 1 -3] [ 0 0] As you can see, both results are incorrect. What am I doing wrong? Last fiddled with by paul0 on 2015-11-17 at 12:35
2015-11-17, 13:01   #2
WraithX

Mar 2006

2·263 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]

2015-11-17, 13:04   #3
paul0

Sep 2011

3×19 Posts

Quote:
 Originally Posted by WraithX Be sure to check the built-in documentation for what a function does, using either ? or ??: 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...
Thank you :)

Last fiddled with by paul0 on 2015-11-17 at 13:04

 Similar Threads Thread Thread Starter Forum Replies Last Post JM Montolio A Lounge 11 2018-03-08 06:26 carpetpool Programming 6 2017-12-21 06:04 skan Miscellaneous Math 0 2012-12-16 00:13 devarajkandadai Programming 21 2012-08-31 18:08 CRGreathouse Software 2 2009-03-13 04:22

All times are UTC. The time now is 00:00.

Thu Dec 1 00:00:23 UTC 2022 up 104 days, 21:28, 0 users, load averages: 0.93, 0.91, 0.93

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔