Skip to content

Bilboow/Big_Integers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Big_Integers

Approach: To create a new data type of big integers following concepts are being implemented:

->C++ strings in that we can store our numbers in the form of characters (in reverse order for efficiency purposes) such that using strings we can store very big numbers also.

->For the addition/subtraction operation of two big integers, use the basic math for addition which says that add the corresponding two digits and if some carry is generated add it to the sum of the next digits and repeat this process until all digits are added/subtracted.

->Similarly, for the multiplication of two numbers, use the basic mathematics approach which states that multiply every digit of one number with the other complete number and at last add all the numbers we get in multiplication.

->The following operations are being performed on BigInt-

1.Defining some big integers.

2.Checking the number of digits in the big integer.

3.Post/Pre Incrementation or Decrementation

4.Adding two big integers.

5.Subtracting two big integers.

6.Multiplying two big integers.

7.Divide two big integers

8.Modulo of two big integers

9.The square root of a big integer (floor integer value)

10.Raise a big integer to a power

11.Converting a simple integer to a big integer.

12.Calculating Fibonacci up to 10 000. (even 100000 but slower)

13.Calculating Factorial up to 1 000.

14.Calculating Catalan up to 1 000.

15.Checking which big integer is greater and which is smaller.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages