Question: Big Number Arithmetic C Program The goal is to perform several multiplication functions/algorithims using unlimited length digits (BigInts) and compare their execution times. The program
Big Number Arithmetic C Program
The goal is to perform several multiplication functions/algorithims using unlimited length digits (BigInts) and compare their execution times.
The program requires a header file which includes all functions needed by the .c file.
Required functions:
ClassicalMult (bigInt A, bigInt B, int base) - this function multiplies two big integers using the classical multiplication algorithim.
KaratsubaMult (bigInt A, bigInt B, int base) - this function multiplies two big integers using the Karatsuba multiplication algorithim.
ToomMult (bigInt A, bigInt B, int base) - this function multiplies two big integers using the Toom3 multiplication algorithim.
CompareAlgorithms(charfirstalgorithm, charfirstalgorithm, int size) - Compares two of the multiplication algorithims using size_digit random numbers
- Return Values for this function are the execution time for each algorithim and the subtraction of the results of the two algorithms
- pass "c" for classical, "k" for karatsuba, or "t" for Toom-Cook
Large_Rnd (bigInt size) - creates a size_digit random number (BigInt)
Timer () - measures the execution time
PrintBI (bigInt A) - prints a BigInt to stdout
GetBI(bigInt A) - reads in a bigInt from stdin
menu(int item) - this is in main()
- The following options should be included in the menu and all of the required functions also should be created. 1-Adding two big integers (two options: user mode, random mode) 2-Multiplication of two big integers using classic algorithm (two options: user mode, random mode) 3-Multiplication of two big integers using Karatsuba algorithm (two options: user mode, random mode) 4-Multiplication of two big integers using Toom-Cook algorithm (two options: user mode, random mode) 5-Comparing the execution time ofmultiplication algorithms (two options: user mode, random mode) 6-Testing the correctness of algorithms 7-Continue or quit
Any helper or auxillary functions should also be included in the header .h file and .c file.
such as addition, subtraction, base conversion, data type conversion, etc
Test Data
Choose one pair of 1000-digit random numbers. Compare the execution time of all of the multiplication algorithms and show the results.
The final result should be the average of at least 10 times
Comments Should explain the algorithms shortly and precisely. Any assumptions should be explained clearly.
*The default base is 10
**edit**
I got working functions for printBI, Large_Rnd, and the addition.
I just really need help with all the multiplication and compareAlgorithm functions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
