My Project
My Project Documentation

This class can strore and do math operations with realy big numbers.

The numbers could be integer or fractional with thausands of digits. It uses string as data containers, so the limitation of how big they can be will defined by limitaion of std::string class which it will be limited by hardware resources

To limit divition digits member variable max_div_digits can be set

The example below shows how to use this class

#include "BigNumber.h"
#include <iostream>
#include <string>
int main() {
BigNumber i,j,k;
i = "0.0000000000000000000000000000000000000000000000000000000001"
j = "-300000000000000000000000000000000000000000000000000000000000"
std::cout << i + j << std::endl;
std::cout << i - j << std::endl;
std::cout << i * j << std::endl;
max_div_digits = 1000;
std::cout << i / j << std::endl;
if (i == j) std::cout << "i = j";
if (i > j) std::cout << "i > j";
if (i < j) std::cout << "i = j";
{
Author
Makan Edrisi
Version
1.1
Date
Dec 2018

Souce code can be found at https://github.com/makannew/Big-Numbers