High‑performance multiprecision integer library for C++
The intx header-only C++20 library provides allocation-free extended precision
integer types. They are implemented as arrays of std::uint64_t words
and closely match the behavior of built-in types.
To build, test or benchmark.
git clone https://github.com/chfast/intx
cd intx
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
build/test/intx-unittests
build/test/intx-benchThe @pre and @post sections in the documentation of functions in
intx.hpp are specifications written in Lean 4
(the notation is introduced in Theorem Proving in Lean 4).
The fv/main branch contains proofs that the RV64 machine code
of these functions satisfies their specifications.
The proofs cover selected template instances, mostly for uint256.
See the fv/main README
for what is proved and what is assumed.
Functions without @post are not verified.
The @note FV: sections mark the cases not covered by the proofs.
Paweł Bylica @chfast
Licensed under the Apache License, Version 2.0.