Skip to content

Repository files navigation

BigInt-cpp

Hahah C++ is BETTER and FASTER than python

Supports:

  • +, ++, +=
  • -, --, -=
  • *, *=
  • .pow
  • <<, <<=
  • >>, >>=
  • |, |=
  • ^, ^=
  • &, &=

Example

compile with g++ -O3 -o output sample.cpp BigInt.cpp

// sample.cpp
#include<iostream>
#include<string>
#include"BigInt.hpp"usingnamespacestd;intmain() {
BigInt num1 = (string)"01189998819991197253";
BigInt num2;
cin >> num2;
cout << "Num2 is : " << num2 << "\n";
cout << num1 + num2 << "\n";
cout << num1 * num2 << "\n";
cout << num1 - num2 << "\n";
cout << num1.pow(num2) << "\n";
}

About

Fast implementation of big integer operations in c++

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages