ttmath

C++ library for arbitrary precision arithmetic and big numbers

brewmacoslinux
Try with needOr install directly
Source

About

Bignum library for C++

Commands

ttmath

Examples

Include ttmath header in C++ project for big integer operations$ #include <ttmath/ttmath.h> ttmath::Big<1,0> a = 123456789; ttmath::Big<1,0> b = 987654321; ttmath::Big<1,0> result = a * b;
Use ttmath for high-precision floating point calculations$ ttmath::Big<10,20> pi = "3.14159265358979323846"; ttmath::Big<10,20> radius = 5; ttmath::Big<10,20> area = pi * radius * radius;
Compile C++ program linking against ttmath library$ g++ -o bignum_calc bignum_calc.cpp -I$(brew --prefix ttmath)/include