This directory contains an interface to the LiDIA library, version 1.2.1.
LiDIA is available from
             ftp://crypt1.cs.uni-sb.de/pub/systems/LiDIA
or           ftp://ftp.cs.uni-sb.de/pub/LiDIA
(The LiDIA group has also a nice Web page.)

LiDIA has an abstract interface to the underlying long integer implementation.
Using CLN instead of the default libI, lip or gmp has the following
advantages:

  - Maximum speed on all CPUs, since CLN is based on the highly
    optimized gmp-2.0.2.

  - Very large integers profit from CLN's Schönhage-Strassen FFT multiplication
    (asymptotic bit complexity: O(N log N log log N)).

  - Copying integers is fast: no copying is actually involved, only a
    reference count is manipulated.

  - Small integers (absolute value < 2^29) are represented immediately,
    thus no memory allocation/deallocation is involved when dealing with
    small integers.

CLN does all this automatically.

INSTALLATION
------------

1. Build CLN.

2. Configure LiDIA as described in its manual.

3. Apply the patch to LiDIA:
   $ cd .../LiDIA
   $ patch -p1 < .../cln/lidia-interface/LiDIA-patch

4. Make two symbolic links
   $ ln -s .../cln/lidia-interface/interfaces/integers/cln \
           .../LiDIA/src/interfaces/integers/cln
   $ ln -s .../cln/BUILDDIR/src .../LiDIA/src/kernel/integers/cln
   where .../cln/BUILDDIR is the directory in which you have built
   cln (i.e. there is a file .../cln/BUILDDIR/src/libcln.a).

5. Modify the definitions of the variables CLN_DIR and CLN_TARGETDIR in
   the file .../LiDIA/config/CONFIG :
   CLN_DIR must point to .../cln,
   CLN_TARGETDIR must point to .../cln/BUILDDIR.

6. Build LiDIA as described in its manual.

