Compare commits

..

No commits in common. "7881302e6c15005bd808c46aa229820b83c21223" and "70b40cdeeb10cb69f607c85d2b372ef03fe10875" have entirely different histories.

2 changed files with 7 additions and 21 deletions

View File

@ -17,21 +17,14 @@ pip install git+https://gitea.fabelous.app/Fabel/fabelous-math.git
To use the functions provided by Fabelous Math in your Python code, you can import them as follows: To use the functions provided by Fabelous Math in your Python code, you can import them as follows:
```python ```python
from fabelous_math import is_even, is_odd, rooting, approximate_pi from fabelous_math import is_even, is_odd
# Example usage:
number = 42 number = 42
print(f"Is {number} even? {is_even(number)}") print(f"Is {number} even? {is_even(number)}")
print(f"Is {number} odd? {is_odd(number)}") print(f"Is {number} odd? {is_odd(number)}")
# Extended feature for rooting with a specified root
root = 4
number = 16
print(f"Rooting {number} to the power of {root}: {rooting(number, root)}")
# Extended feature for approximate_pi with additional parameters if needed
precision = 10000000
print(f"Approximate Pi with precision {precision}: {approximate_pi(precision)}")
``` ```
## 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:

View File

@ -1,14 +1,7 @@
from fabelous_math import is_even, is_odd, rooting, approximate_pi from fabelous_math import is_even, is_odd, rooting, approximate_pi
number = 42 print(approximate_pi(10000000))
print(f"Is {number} even? {is_even(number)}")
print(f"Is {number} odd? {is_odd(number)}")
# Extended feature for rooting with a specified root print(rooting(0.5))
root = 4 print(is_even(5))
number = 16 print(is_odd(19))
print(f"Rooting {number} to the power of {root}: {rooting(number, root)}")
# Extended feature for approximate_pi with additional parameters if needed
precision = 10000000
print(f"Approximate Pi with precision {precision}: {approximate_pi(precision)}")