development suspended, currently not working
A C++ class for handling large integer numbers (greater than 64 bits) with arbitrary bases. Please note that the class isn't complete, doesn't compile and has never been tested.
The LongNumber
class is designed to represent large numbers with arbitrary bases (between 2 and 16, included), providing a set of operations like addition, subtraction, multiplication, and division. It supports signed and unsigned integers and can be initialized from various data types, from standard integers to string.
It does not rely on anthing but standard library
- Handles large numbers with arbitrary bases.
- Implements base conversion tools
- Arithmetic operations: comparisons, addition, subtraction, multiplication, division, modulo and power, everything both signed and unsigned
- Supports operations between LongNumbers with different bases
- Supports operations between LongNumbers and primitive types
- Constructor overloads for different numeric types and string representations.
- Custom exceptions for error handling.
- Designed with ease of use and flexibility in mind.
- constructors
- comparisons
- additions
- substractions
- base changes
- multiplications
- type casting
- input/output
- modulus
Refer to the doxygen-generated documentation in the
see comments on the codedocs
folder.
Feel free to contribute, submit PRs, open Issues - every improvement proposal is welcome!
I think MIT licence is the most suitable one... Anyway, do whatever you want with this code. I don't care