Core utilities
By Ross Smith
This is a set of basic utilities that I use throughout my C++ code, collected here to avoid widespread duplication. Basically I put stuff in here when I get tired of re-implementing it in multiple projects.
Requires C++23. Not yet tested on all compilers.
rs-core/arithmetic.hpp – Arithmetic types and functionsrs-core/constants.hpp – Physical constantsrs-core/linear-algebra.hpp – Linear algebrars-core/mp-integer.hpp – Multiple precision integersrs-core/random.hpp – Random number generatorsrs-core/rational.hpp – Rational numbersrs-core/uint128.hpp – 129-bit integersThere is a CMakeLists.txt file, but this is usually only needed if you want
to run the unit tests. The library is header-only and can be installed simply
by copying or linking the rs-core directory into somewhere on your include
path. Running
cmake --build . --config Release --target install
will do this, or you can just copy or symlink it by hand.
To use the library, just #include the headers you want. No special link-time
options are needed.