jevan-smith / Karatsuba

Multiplication of Large Integers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Authors

Made by: Jevan, and Juan

Project Goals

  1. Implement Karatsuba algorithm to multiply two integers A and B whose values are less than or equal to 1000.
  2. Implement Exponentiation algorithm to evaluate AB, where A and B are two integers whose values are less than or equal to 1000. The maximum value of AB can be 10001000 which has 3001 digits.

Requirements

  • Built using C++17
  • type "make" to build file (on linux)
  • after compiling type "./main.out" to run file (on linux)
  • Compiled using MinGW on local machine (Version: w64 6.0)

Expected Outputs Below

===================
Options:
===================
[1] Task 1
[2] Task 2
[3] Exit
Option: 1
Using Karatsuba Multiplication:
32 * 43 = 1376

===================
Options:
===================
[1] Task 1
[2] Task 2
[3] Exit
Option: 2
Using Karatsuba Power:
32 ^ 43 = 52656145834278593348959013841835216159447547700274555627155488768

===================
Options:
===================
[1] Task 1
[2] Task 2
[3] Exit
Option: 3

About

Multiplication of Large Integers


Languages

Language:C++ 97.5%Language:Makefile 2.5%