BIG INTEGER CALCULATOR

DESCRIPTION

This program is used to calculate big integers with over 19 digits. The larger the number is, the more memory and time it takes to process.

DATA STRUCTURE

The program uses mainly Struct and Array (String).
  struct BigInt
  {
      bool pos; //The number is positive or not?
      string num; //Carry the entered number.
  };

FUNCTIONS

  • Convert integer to BigInt and vice versa
  • Comparision
  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Modular
  • Factorial
  • Square Root
  • Square
  • Exponentiation (Power)
  • Power and mod (a^b % c)
  • Absolute Value (abs)
  • Sin, cos, tan, cot
  • Greatest Common Divisor (gcd)
  • Lowest Common Multiple (lcm)
  • Prime Check

REFERENCE DOCUMENTS

Multiplication
Square Root
Greatest Common Divisor
Prime Check - Simple Method
Prime Check - Miller Rabin

NOTES

Most of functions mentioned above return BigInt even Division and Square Root.