Mppp

Jul 20, 2023

Multiprecision for modern C++

mp++ is a C++11 library for multiprecision arithmetic, currently supporting arbitrary-precision integers, rationals and floats, and quadruple-precision floats.

Based on well-known libraries such as GMP, MPFR, and others, mp++ was initially conceived as a GMP wrapper with a special focus on performance with small operands. In particular, a small buffer optimisation and custom implementations of basic mathematical primitives are instrumental in achieving a performance increase, with respect to GMP and other integer multiprecision libraries, which can be substantial see the benchmarks section of the documentation. The price to pay is a small overhead when operating on large integers.

Eventually, a multiprecision rational class and two multiprecision floating-point classes were added, and today a secondary objective of mp++ is to provide a modern, consistent and unified C++ interface to several lower-level multiprecision libraries.



Checkout these related ports:
  • Zn_poly - C library for polynomial arithmetic
  • Zimpl - Language to translate the LP models into .lp or .mps
  • Zegrapher - Software for plotting mathematical objects
  • Zarray - Dynamically typed N-D expression system based on xtensor
  • Z3 - Z3 Theorem Prover
  • Yices - SMT solver
  • Yacas - Yet Another Computer Algebra System
  • Xtensor - Multi-dimensional arrays with broadcasting and lazy computing
  • Xtensor-python - Python bindings for xtensor
  • Xtensor-io - Xtensor plugin to read/write images, audio files, numpy npz and HDF5
  • Xtensor-blas - BLAS extension to xtensor
  • Xspread - Spreadsheet program for X and terminals
  • Xppaut - Graphical tool for solving differential equations, etc
  • Xplot - X11 plotting package
  • Xlife++ - XLiFE++ eXtended Library of Finite Elements in C++