# Add the libadic PPA
sudo add-apt-repository ppa:IguanAI/libadic-stable
sudo apt-get update
# Install the library and development files
sudo apt-get install libadic-dev
# Optional: Install documentation
sudo apt-get install libadic-doc# Download the latest release from GitHub
wget https://github.com/IguanAI/libadic/releases/download/v1.0.0/libadic_1.0.0-1_amd64.deb
wget https://github.com/IguanAI/libadic/releases/download/v1.0.0/libadic-dev_1.0.0-1_amd64.deb
# Install packages
sudo dpkg -i libadic*.deb
sudo apt-get install -f # Fix any dependency issuessudo apt-get install build-essential devscripts debhelper cmake
sudo apt-get install libgmp-dev libmpfr-devgit clone https://github.com/IguanAI/libadic.git
cd libadic
./scripts/build_deb.shThis creates:
libadic1_1.0.0-1_amd64.deb- Runtime librarylibadic-dev_1.0.0-1_amd64.deb- Development fileslibadic-doc_1.0.0-1_all.deb- Documentation
sudo dpkg -i ../libadic*.deb- Create a Launchpad account
- Generate and upload GPG key
- Add SSH key
- Go to your Launchpad profile
- Click "Create a new PPA"
- Name it
libadic-stable
cd libadic
./scripts/setup_ppa.sh
# Follow the promptsgit clone https://github.com/IguanAI/libadic.git
cd libadic
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
sudo make installcmake .. -DBUILD_SHARED_LIBS=ON
make -j$(nproc)
sudo make install
sudo ldconfig # Update library cache#include <libadic/zp.h>
#include <libadic/padic_gamma.h>
using namespace libadic;
int main() {
// Compute Morita's Gamma function
Zp gamma = gamma_p(5, 7, 20);
std::cout << gamma.to_string() << std::endl;
return 0;
}# With pkg-config (if available)
g++ -std=c++17 mycode.cpp `pkg-config --cflags --libs libadic`
# Manual linking
g++ -std=c++17 mycode.cpp -ladic -lgmp -lmpfrfind_package(libadic REQUIRED)
target_link_libraries(myapp libadic::adic)docker pull IguanAI/libadic:latest
docker run -it IguanAI/libadic:latest/usr/lib/x86_64-linux-gnu/libadic.so.1- Shared library
/usr/include/libadic/*.h- Header files/usr/lib/x86_64-linux-gnu/libadic.so- Symlink for linking/usr/lib/x86_64-linux-gnu/libadic.a- Static library/usr/lib/x86_64-linux-gnu/cmake/libadic/- CMake config
/usr/share/doc/libadic/- Documentation/usr/share/doc/libadic/examples/- Example code/usr/share/doc/libadic/validation/- Uniqueness proof
# Check if installed
dpkg -l | grep libadic
# Find installed files
dpkg -L libadic-dev
# Test compilation
echo '#include <libadic/zp.h>
int main() { libadic::Zp x(5, 10, 1); return 0; }' > test.cpp
g++ -std=c++17 test.cpp -ladic -lgmp -lmpfr && ./a.out && echo "Success!"sudo apt-get install libgmp-dev libmpfr-devsudo ldconfig
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATHexport CMAKE_PREFIX_PATH=/usr/local:$CMAKE_PREFIX_PATHcd build
cpack -G RPMSee packaging/PKGBUILD (coming soon)
brew tap IguanAI/libadic
brew install libadiclibadic is distributed under the MIT License. The Debian packages maintain this license.
libadic - The ONLY implementation of the Reid-Li criterion for the Riemann Hypothesis