Valid
        XHTML 1.1! Valid CSS!
Created 2011-03-13 Modified Chelton Evans

LiDIA home

LiDIA is a computational number theory library that is no longer being supported, but was released under a GPL, see A personal introduction to LiDIA - The Scribbler of the Rueful Countenance.

As some of my code depends on LiDIA I have linked to the library released in the public domain.

LiDIA
LiDIA: A C++ Library For Computational Number Theory
Download: lidia-2.3.0.tar.bz2

g++ -L/usr/local/include/LiDIA xxx.cpp -lLiDIA -lgmp
doc very good but "code documentation" - look at .h files directly. Source files in /usr/local/include/lidia.

lid0001.cpp
lid0002.cpp
lid0003.cpp

Conversions

bigint has conversion functions e.g. n.xdbl()
convert xdouble to integer long_xdbl(x);

Misc

power(w,2,r-1); - saves to w
sort_vector<bigint> d = divisors(n-1)

factorization u( completely_factor(n) );
u.no_of_prime_components(), u.prime_base(lidia_size_t), u.prime_exponent(k)
u.no_of_composite_components(),

Install

See GMP library to install extended arithmetic library.

On my Linux platform
$ ./configure
$ make
# make install

This however installed the cpp headers to /usr/local/include/lidia . So to access the lidia namespace include LiDIA/factorization.h from a .cpp file I created the following symlink.

/usr/local/include# ln -s lidia LiDIA
created
/usr/local/include/LiDIA
and of course the path variable was already set to include the /usr/local/include directory.

Issues

Library no longer supported. Lidia main page not found.

g++ compiler error which I believe is g++ error.
uncommented type identifier on precondition_error when make failed.
src/base/include/LiDIA/precondition_error.h
src/base/system/precondition_error.cc