https://github.com/leksus-04/big_int-for-cpp
C++ big integer implementation
https://github.com/leksus-04/big_int-for-cpp
big-int big-integer-arithmetic big-integer-in-c cplusplus
Last synced: about 1 year ago
JSON representation
C++ big integer implementation
- Host: GitHub
- URL: https://github.com/leksus-04/big_int-for-cpp
- Owner: LeKSuS-04
- License: wtfpl
- Created: 2021-01-17T18:51:43.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-28T09:15:30.000Z (over 4 years ago)
- Last Synced: 2025-01-07T03:12:43.366Z (about 1 year ago)
- Topics: big-int, big-integer-arithmetic, big-integer-in-c, cplusplus
- Language: C++
- Homepage:
- Size: 110 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is my big integer class implementation for C++. You can use it to perform following operations on numbers of any size:
1. Arithmetical operators: +, -, *, /, %;
2. Boolean operators: >, <, ==, <=, >=;
3. Unary operators: -, +;
4. Assignment operators: = (to big_int=big_int, big_int=string and big_int=int);
5. Input/output operators: >>, <<;
6. Increment and decrement operators: both prefix and postfix ++, both prefix and postfix --;
7. Arithmetic operators with assignment: +=, -=, *=, /=, %=;
8. Other math functions:
- abs(big_int): returns absolute value of a number
- fact(big_int): returns factorial of a number
- pow(big_int, big_int): raises number to given non-negative power
- sqrt(big_int): calculates square root of a number
- root(big_int, big_int): Calculates root of a given degree from a number