Compare commits
No commits in common. "e75f41281e5985a248a2a3fbee87776a96263946" and "99b8cdf42d74be842b338d5ca5dba417861ada5f" have entirely different histories.
e75f41281e
...
99b8cdf42d
37
README.md
37
README.md
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue