All Projects → kothariji → BhimIntegers

kothariji / BhimIntegers

Licence: MIT License
BhimIntegers🚀 is a C++ library that is useful when we are dealing with BigIntegers💥💥. We can handle big integers (integers having a size bigger than the long long int data type) and we can perform arithmetic operations📘 like addition, multiplication, subtraction, division, equality check, etc📐📐. Also, there are several functions like factorial, …

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to BhimIntegers

hacktoberfest20
Participate in Hacktoberfest by contributing to any Open Source project on GitHub! Here is a starter project for first-time contributors. #hacktoberfest20. Don’t forget to read the README.md for guidance.
Stars: ✭ 18 (-58.14%)
Mutual labels:  digitalocean, opensource, hacktoberfest2020
J.A.R.V.I.S
Just A Rather Very Intelligent System
Stars: ✭ 36 (-16.28%)
Mutual labels:  digitalocean, beginner-friendly, hacktoberfest2020
hacktoberfest 2021
Solve the given questions, and submit a PR.💬 Make sure you submit the solution in the correct folder. ✔
Stars: ✭ 44 (+2.33%)
Mutual labels:  digitalocean, beginner-friendly, hacktoberfest2020
Gitstart
Make a Pull Request
Stars: ✭ 415 (+865.12%)
Mutual labels:  digitalocean, opensource, beginner-friendly
Hacktoberfest 2020
Welcome to Open-source! Simply add your details to contributors | Repo for Hacktoberfest 2020 ✅
Stars: ✭ 621 (+1344.19%)
Mutual labels:  digitalocean, opensource, beginner-friendly
Competitive Programming
Hello Programmers 💻 , A one-stop Destination✏️✏️ for all your Competitive Programming Resources.📗📕 Refer CONTRIBUTING.md for contributions
Stars: ✭ 113 (+162.79%)
Mutual labels:  digitalocean, opensource, beginner-friendly
Hacktoberfest Simple Practice Programmes
A beginner-friendly open source repository to create your pull request.
Stars: ✭ 42 (-2.33%)
Mutual labels:  digitalocean, opensource, beginner-friendly
bigint
bigint is a C++ library which can handle Very very Big Integers. It can calculate factorial of 1000000... it can go any big. It may be useful in Competitive Coding and Scientific Calculations which deals with very very large Integers. It can also be used in Decryption process. It has many inbuilt functions which can be very useful.
Stars: ✭ 34 (-20.93%)
Mutual labels:  strings, biginteger, biginteger-library
id-mask
IDMask is a Java library for masking internal ids (e.g. from your DB) when they need to be published to hide their actual value and to prevent forging. It has support optional randomisation has a wide support for various Java types including long, UUID and BigInteger. This library bases its security on strong cryptographic primitives.
Stars: ✭ 39 (-9.3%)
Mutual labels:  biginteger, integer
competetive-code-hacktoberfest
For Hacktoberfest Contribution
Stars: ✭ 14 (-67.44%)
Mutual labels:  digitalocean, hacktoberfest2020
BigInteger
Be limited not by the size of your register but by the bulk of your RAM.
Stars: ✭ 13 (-69.77%)
Mutual labels:  biginteger, bignumber
BigNumber
A really long long long long long long number in C++
Stars: ✭ 37 (-13.95%)
Mutual labels:  biginteger, bignumber
hacktoberfest2019
A repository for hacktoberfest 2019 [ Not counting towards hacktoberfest contribution ]
Stars: ✭ 12 (-72.09%)
Mutual labels:  digitalocean, beginner-friendly
opendevufcg.org
Portal da OpenDevUFCG
Stars: ✭ 52 (+20.93%)
Mutual labels:  opensource, hacktoberfest2020
hacktoberfest
Fork and Create a Pull Request
Stars: ✭ 13 (-69.77%)
Mutual labels:  digitalocean, hacktoberfest2020
docs
No description or website provided.
Stars: ✭ 16 (-62.79%)
Mutual labels:  opensource, hacktoberfest2020
HacktoberFest21
A beginner friendly repository for HacktoberFest 2021
Stars: ✭ 45 (+4.65%)
Mutual labels:  digitalocean, beginner-friendly
coding-ai
CodingAI is an open source application and it helps to find a mentor related your technologies stack.
Stars: ✭ 60 (+39.53%)
Mutual labels:  opensource, hacktoberfest2020
bagisto-bulk-upload
The Laravel eCommerce Bulk Upload allows the admin to create and add a bulk number of products into Bagisto online store.
Stars: ✭ 16 (-62.79%)
Mutual labels:  opensource, hacktoberfest2020
agile-visitors
Application for registering employee entries with the possibility of generating reports, validating and storing users with minimal effort.
Stars: ✭ 23 (-46.51%)
Mutual labels:  opensource, hacktoberfest2020

BhimIntegers

An Implementation of BigInteger library in C++

Banner

BhimIntegers is a C++ library that is useful when we are dealing with BigIntegers. We can handle big integers (integers having a more significant size than the long long data type). We can perform arithmetic operations like addition, multiplication, subtraction, division, equality check, etc. Also, there are several functions like factorial, reverse. We can check that a number is a palindromic number, counting occurrences, etc. It has some conversion options to convert a string to bhimInteger etc. Overall this library is handy for extensive computing results.

Usage

Download the "BhimInteger.h" header .Then #include it inside your code:

#include "BhimInteger.h"   // the actual path may vary

Declaring A Variable

    BhimInteger n1;                                             //n1 defined with value 0
    BhimInteger n2(123);                                        //n2 defined with value int value
    BhimInteger n3((long long int)1234567898765432);            //n3 defined with value long long int value
    BhimInteger n4("7832467326423873423435");                   //n4 defined with string value
    BhimInteger n5(n3);   

Converting to BhimNumbers

    int num1 = -321;
    long long int num2 = -9876543219876543;
    string str1 = "-2112321321321312421534365777";
    BhimInteger n6 = to_Bhim(num1);                              //converting int to BhimInteger
    BhimInteger n7 = to_Bhim(num2);                              //converting long long int to BhimInteger
    BhimInteger n8 = to_Bhim(str1);                              //converting string to BhimInteger

Arithmatic Operations

   cout<<"Addition: "<<n1+n2<<endl;                             //Addition
   cout<<"Subtraction: "<<n2-n1<<endl;                          //subtraction
   cout<<"Multiplication: "<<n1*n2<<endl;                       //Multiplication
   cout<<"Division: "<<n4/n2<<endl;                             //Division

   cout<<"n2 + 5: "<<n2+5<<endl;
   cout<<"n2 - 5: "<<n2-5<<endl;
   cout<<"n2 * 5: "<<n2*5<<endl;
   cout<<"n2 / 5: "<<n2/5<<endl;

   cout<<"5 + n2: "<<5+n2<<endl;
   cout<<"5 - n2: "<<5-n2<<endl;
   cout<<"5 * n2: "<<5*n2<<endl;
   cout<<"5 / n2: "<<5/n2<<endl;

Other Operations

unary operations

    cout<<"PreIncrement: "<<++n2<<endl;
    cout<<"PreDecrement: "<<--n2<<endl;
    cout<<"PostIncrement: "<<n2++<<endl;
    cout<<"PostDecrement: "<<n2--<<endl;

equality check

    cout<<"Check n3 != n5: "<<(bool)(n3 != n5)<<endl;            //Checking if value of both are different
    cout<<"Check n3 == n5: "<<(bool)(n3 == n5)<<endl;            //Checking if value of both are same

few other operators

    n3 += n2;
    cout<<"n3 += n2: "<<n3<<endl;

    n3 -= n2;
    cout<<"n3 -= n2: "<<n3<<endl;

    n3 *= n2;
    cout<<"n3 *= n2: "<<n3<<endl;

    n3 /= n2;
    cout<<"n3 /= n2: "<<n3<<endl;

Functions

    cout<<"Maximum: "<<maxBhim(n1, n2)<<endl;                               //Maximum of two Numbers
    cout<<"Minimum: "<<minBhim(n1, n2)<<endl;                               //Minimum of two Numbers
    cout<<"absolute: "<<absBhim(n1)<<" "<<absBhim(n2)<<endl;                //Absolute value of a number
    cout<<"Factorial: "<<factBhim(n1)<<" "<<factBhim(n2)<<endl;             //Factorial of a number
    cout<<"Reverse: "<<revBhim(n3)<<endl;                                   //Reverse a number
    cout<<"Counting the occurance of a digit: "<<countBhim(n9,6)<<endl;     //Counting the occurance of a digit
    cout<<"Erasing all occurance of a digit: "<<eraseBhim(n9,4)<<endl;      //Erasing all occurances of a digit
    cout<<"isPaliBhim: "<<(bool)isPaliBhim(n9)<<endl;                       //Checking if a number is palindrome
    cout<<"sorting the digits: "<<sortBhim(n9)<<endl;                       //sort the digits of a number
	cout<<"Finds power: "<<powBhim(n3, n2)<<endl;                           //finds x to the power y, where x and y is any int. Returns Integer value in form of string
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].