<commit_before># fplll 4.0 #

* [Overall description](#overall_description)
* [Dependencies](#dependencies)
* [Installation](#installation)
* [Check](#check)
* [How to use](#how_to_use)
	* [latticegen](#latticegen)
	* [fplll](#fplll)
	* [llldiff](#llldiff)
* [How to use as a library](#how_to_use_as_a_library)
	* [Functions](#functions)
		* [LLL](#lll)
		* [BKZ](#bkz)
		* [SVP](#svp)
	* [Data Types](#data_types)
		* [Z\_NR](#z_nr)
		* [FP\_NR](#fp_nr)
		* [Matrix](#matrix)
		* [MatrixRow](#matrix_row)
		* [ZZ\_mat](#zz_mat)
		* [FP\_mat](#fp_mat)
		* [See also](#see_also)
* [Expamles](#examples)
* [Developers](#developers)
* [How to cite](#how_to_cite)
* [Acknowledgments](#acknowledgments)
* [New releases and bug reports](#new_releases_and_bug_reports)

<a name="overall_description"></a>
## Overall description ##

fplll is distributed under the <a href="COPYING">GNU Lesser General
Public License</a> (either version 2.1 of the License, or, at your option, any later version)
as published by the Free Software Foundation.

fplll contains several algorithms on lattices that rely on
floating-point computations. This includes implementations of the
floating-point LLL reduction algorithm, offering different
speed/guarantees ratios. It contains a 'wrapper' choosing the
estimated best sequence of variants in order to provide a guaranteed
output as fast as possible. In the case of the wrapper, the
succession of variants is oblivious to the user. It also includes
a rigorous floating-point implementation of the Kannan-Fincke-Pohst
algorithm that finds a shortest non-zero lattice vector, and the
BKZ reduction algorithm.

<a name="dependencies"></a>
## Dependencies ##

* Absolutely needed:
	* GNU MP 4.2.0 or higher [http://gmplib.org/](http://gmplib.org/)
	* MPFR 2.3.0 or higher, COMPLETE INSTALLATION [http://www.mpfr.org/](http://www.mpfr.org/)
	* autotools 2.61 or higher

If GMP and/or MPFR include and lib files are not in the default
directories /usr/include and /usr/lib, you have to set the
environment variables CFLAGS and LDFLAGS for instance through
the configure command line

```./configure CPPFLAGS="-I/mpfrinclude -I/gmpinclude" LDFLAGS="-L/mpfrlib -L/gmplib"```

or

```./configure CPPFLAGS="-I/mpfrinclude -I/gmpinclude $CPPFLAGD" LDFLAGS="-L/mpfrlib -L/gmplib $LDFLAGS"```

if these variables already exist in your environment.  This should be modified soon for using
standard `--with-gmp` and `--with-mpfr` package specifications.

<a name="installation"></a>
## Installation ##

If you downloaded the source code from github, you’ll first need to run

    ./autogen.sh

which generates the `./configure` script used to configure fplll by calling the appropriate
autotools command.

Then, to compile and install type

	./configure
	make
	make install			# (as root)

You can remove the program binaries and object files from the source code directory by typing `make
clean`. To also remove the files that `./configure` created (so you can compile the package for a
different kind of computer), type `make distclean`.  By default, `make install` installs the package
commands under `/usr/local/bin`, include files under `/usr/local/include`, etc.  You can specify an
installation directory name other than `/usr/local` by giving `./configure` the option
`--prefix=dirname`.  Run `./configure --help` for further details.

<a name="check"></a>
## Check ##

'cd' to the src directory, and type

	make check

This tests the LLL wrapper given dim55_in as input. If the error message
'INVALID RESULT' is not printed, the self-test has succeeded.

<a name="how_to_use"></a>
## How to use ##

Executable files fplll and latticegen are installed in the directory
bin. If you type 'make check', it will also generate the file llldiff.
(Note that the programs generated by make in the 'src/' directory are
only wrappers to the programs in 'src/.libs/)

<a name="latticegen"></a>
### latticegen ###

latticegen is an utility for generating matrices (rows form input
lattice bases).

The options are :

* r &lt;d&gt; &lt;b&gt; : generates a knapsack style matrix of dimension d,d+1 and b bits.
* s &lt;d&gt; &lt;b&gt; &lt;b2&gt; : generates a simdioph matrix.
* u &lt;d&gt; &lt;b&gt; : generates an uniform matrix.
* n &lt;d&gt; &lt;b&gt; &lt;q&gt; : generates an ntru like matrix.
* N &lt;d&gt; &lt;b&gt; &lt;q&gt; : generates an ntru like matrix.
* a &lt;d&gt; &lt;f&gt; : generates an ajtai style matrix.
* A &lt;d&gt; : generates an ajtai style matrix. Also requires d coefficients.

The matrix is printed in stdout.

Note that by default, the random bits always use the same seed,
to ensure reproducibility. You can change the seed with the option
``` -randseed <integer>``` or use the current time (in seconds)
``` -randseed time```

If you use this option, it must be the first one on the command line.


<a name="fplll"></a>
### fplll ###

fplll does LLL, BKZ or SVP on a matrix (considered as a set of row
vectors) given in stdin or in a file as parameter.

The options are:

* -a lll : LLL-reduction (default).
* -a bkz : BKZ-reduction.
* -a svp : print a shortest vector of the lattice.
* -r &lt;size&gt;, -c &lt;size&gt; : ignored, provided for compatibility with previous versions of fplll.

Options for LLL-reduction:

* -d &lt;delta&gt; :     delta (default=0.99)
* -e &lt;eta&gt; :       eta (default=0.51)
* -l &lt;lovasz&gt; :    if !=0 Lovasz's condition. Otherwise, Siegel's condition (default: Lovasz)
* -p &lt;precision&gt; : precision of the floating-point arithmetic, works only with -f mpfr.

* -f mpfr : sets the floating-point type to MPFR (default if m=proved).
* -f dpe : sets the floating-point type to DPE (default if m=heuristic/heuristicearly).
* -f double : sets the floating-point type to double (default if m=fast/fastearly).
* -f longdouble : sets the floating-point type to long double.

* -z int : sets the integer type to int.
* -z mpz : sets the integer type to mpz, the integer type of GMP (default).
* -z double : sets the integer type to double.

* -m wrapper : uses the wrapper. (default if z=mpz)
* -m fast : uses the fast method, works only with -f double.
* -m fastearly : uses the fast method with early reduction, works only with -f double.
* -m heuristic : uses the heuristic method.
* -m heuristicearly : uses the heuristic method with early reduction.
* -m proved : uses the proved version of the algorithm.

With the wrapper or the proved version, it is guaranteed that the basis is
LLL-reduced with delta'=2&times;delta-1 and eta'=2&times;eta-1/2. For instance, with the
default options, it is guaranteed that the basis is (0.98,0.52)-LLL-reduced.

Options for BKZ-reduction:

* -b &lt;blocksize&gt;            Block size, mandatory, between 2 and the number of rows.
* -f &lt;float_type&gt;           Same as LLL (-p is required if float_type=mpfr)
* -p &lt;precision&gt;            Precision of the floating-point arithmetic with -f mpfr
* -bkzmaxloops &lt;loops&gt;      Maximum number of full loops.
* -bkzmaxtime &lt;time&gt;        Stop after <i>time</i> seconds (up to loop completion).
* -bkzautoabort             Heuristic, stop when the average slope of log(||b_i*||) does not decrease fast enough.
* -bpre &lt;blocksize&gt;         Pre-processing block size. Between 2 and the block size.
* -bkzlinearpruning &lt;level&gt; Enables linear pruning in enumeration, in level dimensions.<commit_msg>clarify linear pruning level in README.md<commit_after># fplll 4.0 #

* [Overall description](#overall_description)
* [Dependencies](#dependencies)
* [Installation](#installation)
* [Check](#check)
* [How to use](#how_to_use)
	* [latticegen](#latticegen)
	* [fplll](#fplll)
	* [llldiff](#llldiff)
* [How to use as a library](#how_to_use_as_a_library)
	* [Functions](#functions)
		* [LLL](#lll)
		* [BKZ](#bkz)
		* [SVP](#svp)
	* [Data Types](#data_types)
		* [Z\_NR](#z_nr)
		* [FP\_NR](#fp_nr)
		* [Matrix](#matrix)
		* [MatrixRow](#matrix_row)
		* [ZZ\_mat](#zz_mat)
		* [FP\_mat](#fp_mat)
		* [See also](#see_also)
* [Expamles](#examples)
* [Developers](#developers)
* [How to cite](#how_to_cite)
* [Acknowledgments](#acknowledgments)
* [New releases and bug reports](#new_releases_and_bug_reports)

<a name="overall_description"></a>
## Overall description ##

fplll is distributed under the <a href="COPYING">GNU Lesser General
Public License</a> (either version 2.1 of the License, or, at your option, any later version)
as published by the Free Software Foundation.

fplll contains several algorithms on lattices that rely on
floating-point computations. This includes implementations of the
floating-point LLL reduction algorithm, offering different
speed/guarantees ratios. It contains a 'wrapper' choosing the
estimated best sequence of variants in order to provide a guaranteed
output as fast as possible. In the case of the wrapper, the
succession of variants is oblivious to the user. It also includes
a rigorous floating-point implementation of the Kannan-Fincke-Pohst
algorithm that finds a shortest non-zero lattice vector, and the
BKZ reduction algorithm.

<a name="dependencies"></a>
## Dependencies ##

* Absolutely needed:
	* GNU MP 4.2.0 or higher [http://gmplib.org/](http://gmplib.org/)
	* MPFR 2.3.0 or higher, COMPLETE INSTALLATION [http://www.mpfr.org/](http://www.mpfr.org/)
	* autotools 2.61 or higher

If GMP and/or MPFR include and lib files are not in the default
directories /usr/include and /usr/lib, you have to set the
environment variables CFLAGS and LDFLAGS for instance through
the configure command line

```./configure CPPFLAGS="-I/mpfrinclude -I/gmpinclude" LDFLAGS="-L/mpfrlib -L/gmplib"```

or

```./configure CPPFLAGS="-I/mpfrinclude -I/gmpinclude $CPPFLAGD" LDFLAGS="-L/mpfrlib -L/gmplib $LDFLAGS"```

if these variables already exist in your environment.  This should be modified soon for using
standard `--with-gmp` and `--with-mpfr` package specifications.

<a name="installation"></a>
## Installation ##

If you downloaded the source code from github, you’ll first need to run

    ./autogen.sh

which generates the `./configure` script used to configure fplll by calling the appropriate
autotools command.

Then, to compile and install type

	./configure
	make
	make install			# (as root)

You can remove the program binaries and object files from the source code directory by typing `make
clean`. To also remove the files that `./configure` created (so you can compile the package for a
different kind of computer), type `make distclean`.  By default, `make install` installs the package
commands under `/usr/local/bin`, include files under `/usr/local/include`, etc.  You can specify an
installation directory name other than `/usr/local` by giving `./configure` the option
`--prefix=dirname`.  Run `./configure --help` for further details.

<a name="check"></a>
## Check ##

'cd' to the src directory, and type

	make check

This tests the LLL wrapper given dim55_in as input. If the error message
'INVALID RESULT' is not printed, the self-test has succeeded.

<a name="how_to_use"></a>
## How to use ##

Executable files fplll and latticegen are installed in the directory
bin. If you type 'make check', it will also generate the file llldiff.
(Note that the programs generated by make in the 'src/' directory are
only wrappers to the programs in 'src/.libs/)

<a name="latticegen"></a>
### latticegen ###

latticegen is an utility for generating matrices (rows form input
lattice bases).

The options are :

* r &lt;d&gt; &lt;b&gt; : generates a knapsack style matrix of dimension d,d+1 and b bits.
* s &lt;d&gt; &lt;b&gt; &lt;b2&gt; : generates a simdioph matrix.
* u &lt;d&gt; &lt;b&gt; : generates an uniform matrix.
* n &lt;d&gt; &lt;b&gt; &lt;q&gt; : generates an ntru like matrix.
* N &lt;d&gt; &lt;b&gt; &lt;q&gt; : generates an ntru like matrix.
* a &lt;d&gt; &lt;f&gt; : generates an ajtai style matrix.
* A &lt;d&gt; : generates an ajtai style matrix. Also requires d coefficients.

The matrix is printed in stdout.

Note that by default, the random bits always use the same seed,
to ensure reproducibility. You can change the seed with the option
``` -randseed <integer>``` or use the current time (in seconds)
``` -randseed time```

If you use this option, it must be the first one on the command line.


<a name="fplll"></a>
### fplll ###

fplll does LLL, BKZ or SVP on a matrix (considered as a set of row
vectors) given in stdin or in a file as parameter.

The options are:

* -a lll : LLL-reduction (default).
* -a bkz : BKZ-reduction.
* -a svp : print a shortest vector of the lattice.
* -r &lt;size&gt;, -c &lt;size&gt; : ignored, provided for compatibility with previous versions of fplll.

Options for LLL-reduction:

* -d &lt;delta&gt; :     delta (default=0.99)
* -e &lt;eta&gt; :       eta (default=0.51)
* -l &lt;lovasz&gt; :    if !=0 Lovasz's condition. Otherwise, Siegel's condition (default: Lovasz)
* -p &lt;precision&gt; : precision of the floating-point arithmetic, works only with -f mpfr.

* -f mpfr : sets the floating-point type to MPFR (default if m=proved).
* -f dpe : sets the floating-point type to DPE (default if m=heuristic/heuristicearly).
* -f double : sets the floating-point type to double (default if m=fast/fastearly).
* -f longdouble : sets the floating-point type to long double.

* -z int : sets the integer type to int.
* -z mpz : sets the integer type to mpz, the integer type of GMP (default).
* -z double : sets the integer type to double.

* -m wrapper : uses the wrapper. (default if z=mpz)
* -m fast : uses the fast method, works only with -f double.
* -m fastearly : uses the fast method with early reduction, works only with -f double.
* -m heuristic : uses the heuristic method.
* -m heuristicearly : uses the heuristic method with early reduction.
* -m proved : uses the proved version of the algorithm.

With the wrapper or the proved version, it is guaranteed that the basis is
LLL-reduced with delta'=2&times;delta-1 and eta'=2&times;eta-1/2. For instance, with the
default options, it is guaranteed that the basis is (0.98,0.52)-LLL-reduced.

Options for BKZ-reduction:

* -b &lt;blocksize&gt;            Block size, mandatory, between 2 and the number of rows.
* -f &lt;float_type&gt;           Same as LLL (-p is required if float_type=mpfr)
* -p &lt;precision&gt;            Precision of the floating-point arithmetic with -f mpfr
* -bkzmaxloops &lt;loops&gt;      Maximum number of full loops.
* -bkzmaxtime &lt;time&gt;        Stop after <i>time</i> seconds (up to loop completion).
* -bkzautoabort                   Heuristic, stop when the average slope of log(||b_i*||) does not decrease fast enough.
* -bpre &lt;blocksize&gt;         Pre-processing block size. Between 2 and the block size.
* -bkzlinearpruning &lt;level&gt; Enables linear pruning in enumeration, such that the last level steps drop with slope -1/blockSize
{'fraction_non_alphanumeric': 0.11636216544192005, 'fraction_numerical': 0.005056293399851682, 'mean_word_length': 4.116936874784408, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2028323', 'n_tokens_mistral': 4970, 'n_tokens_neox': 4674, 'n_words': 1889}