https://github.com/theadaptoid/simple-math
Simple Math is a collection of functions for performing basic mathematical operations.
https://github.com/theadaptoid/simple-math
mathematics package python
Last synced: about 1 year ago
JSON representation
Simple Math is a collection of functions for performing basic mathematical operations.
- Host: GitHub
- URL: https://github.com/theadaptoid/simple-math
- Owner: TheAdaptoid
- Created: 2025-03-18T03:09:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-20T22:37:24.000Z (over 1 year ago)
- Last Synced: 2025-03-20T23:29:17.753Z (over 1 year ago)
- Topics: mathematics, package, python
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Math
Simple Math is a collection of functions for performing basic mathematical operations.
```bash
pip install simple-math
```
## Arithmetic
### Elementary
This module contains the implementation of the simplest arithmetic operations.
The functions in this module are used to add, subtract, multiply and divide two numbers.
The functions are:
- `add(a, b)`: Adds two numbers.
- `subtract(a, b)`: Subtracts two numbers.
- `multiply(a, b)`: Multiplies two numbers.
- `divide(a, b)`: Divides two numbers.
- `integer_divide(a, b)`: Divides two numbers using integer division.
The functions take two arguments, which must be of type `int` or `float`.
The return value is of the same type as the arguments.
The functions will raise a `TypeError` if the arguments are not of type `int` or `float`.
The functions will raise a `ValueError` if the arguments are zero
when using the `divide` or `integer_divide` functions.