LongFloat is a C++ library for dealing with arbitrary-precision float arithmetic.
Use Git to install LongFloat.
git clone 'https://github.com/GeorgiyIshchenko/LongFloat'
#include <iostream>
#include <LongFloat.h>
using namespace LongNums;
int main() {
LongFloat a("1.15");
LongFloat b("2.3");
std::cout << -a << std::endl;
std::cout << a * b << std::endl;
std::cout << a + b << std::endl;
std::cout << a - b << std::endl;
std::cout << b / a << std::endl;
std::cout << "123"_LF / "345"_LF << std::endl;
return 0;
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.