Compare commits

..

No commits in common. "f99505598d6d01e3cca233459b9972bf894490d2" and "efa67dfc3fd568bff99f47532554687241da1bf4" have entirely different histories.

1 changed files with 36 additions and 1 deletions

View File

@ -7,7 +7,7 @@ Fabelous Math is a simple library designed to provide basic mathematical functio
You can easily install `fabelous-math` using pip: You can easily install `fabelous-math` using pip:
```sh ```sh
pip install git+https://gitea.fabelous.app/Fabel/fabelous-math.git pip install https://gitea.fabelous.app/Fabel/fabelous-math.git
``` ```
## Usage ## Usage
@ -25,6 +25,41 @@ print(f"Is {number} even? {is_even(number)}")
print(f"Is {number} odd? {is_odd(number)}") print(f"Is {number} odd? {is_odd(number)}")
``` ```
## Functions
### `is_even`
Checks if a given number is even.
- **Python:**
```python
def is_even(number: int) -> bool:
pass
```
- **C++:**
```cpp
namespace simple_functions {
bool is_even(long long number);
}
```
### `is_odd`
Checks if a given number is odd.
- **Python:**
```python
def is_odd(number: int) -> bool:
pass
```
- **C++:**
```cpp
namespace simple_functions {
bool is_odd(long long number);
}
```
## Performance Comparison ## Performance Comparison
To understand the performance of `fabelous-math` functions, I conducted a series of tests comparing my methods with traditional modulo operations. Below are the results: To understand the performance of `fabelous-math` functions, I conducted a series of tests comparing my methods with traditional modulo operations. Below are the results: