https://github.com/glanguage/big_numbers
A python module for the calculations of big numbers, including integers and floats.
https://github.com/glanguage/big_numbers
python
Last synced: 12 days ago
JSON representation
A python module for the calculations of big numbers, including integers and floats.
- Host: GitHub
- URL: https://github.com/glanguage/big_numbers
- Owner: GLanguage
- Created: 2019-05-18T14:43:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-20T15:04:08.000Z (almost 7 years ago)
- Last Synced: 2025-03-05T09:18:23.078Z (over 1 year ago)
- Topics: python
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Big_Numbers
A python module for the calculations of big numbers, including integers and floats.
To use the module, you should download `Big_Numbers.py` and enter: `import Big_Numbers` in the python shell.
## BigInt
A class for big integers.
Use `BigInt(str)` to creat a BigInt object.
For instance:
```
a = BigInt("-1234567890")
```
Now, the following calculations are available:
```
len(a) # including the symbol '-'
+a
-a
abs(a)
a < b
a > b
a == b
a != b
a <= b
a >= b
a + b
a - b
a * b
a // b
a % b
```
Wait for more!
_Notes:_ Two constants are available:
```
ZERO = BigInt("0")
ONE = BigInt("1")
```
## Errors
`ZeroDivisionError` : When you are trying to divide a number by 0.