Metadata-Version: 2.4
Name: frasty
Version: 1.0.0
Summary: Frasty is a python library that allows you to easily calculate fractions
Home-page: https://github.com/Tina-1300/Frasty
Author: Tina
Author-email: tina.xytrfgthuji1348@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.13.0
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Frasty
Frasty is a python library that allows you to easily calculate fractions

---

## 📦 Installation

You can install Frasty via `pip` :

```bash
pip install frasty
```

## 🚀 Use

```python
from Frasty.Fraction import Fraction

# Creating fractions
f1 = Fraction(3, 5)
f2 = Fraction(4, 3)
f3 = Fraction(-2, 7)
f4 = Fraction(6, 8) # will be simplified to 3/4

print("Fractions cree :")
print(f"f1 = {f1}") 
print(f"f2 = {f2}")
print(f"f3 = {f3}")
print(f"f4 = {f4} (simplifier)")

print("\nRepresentation officielle (repr) :")
print(repr(f1))
print(repr(f4))

# Arithmetic operations
print("\nOperations arithmetiques :")
print(f"f1 + f2 = {f1 + f2}")
print(f"f1 - f2 = {f1 - f2}")
print(f"f1 * f2 = {f1 * f2}")
print(f"f1 / f2 = {f1 / f2}")

# Operations with integers
print("\nAvec des entiers :")
print(f"f1 + 2 = {f1 + 2}")
print(f"2 + f1 = {2 + f1}")
print(f"f1 * 3 = {f1 * 3}")
print(f"3 * f1 = {3 * f1}")
print(f"f1 - 1 = {f1 - 1}")
print(f"1 - f1 = {1 - f1}")
print(f"f1 / 2 = {f1 / 2}")
print(f"2 / f1 = {2 / f1}")

# Comparisons
print("\nComparaisons :")
print(f"f1 == Fraction(3,5) ? {f1 == Fraction(3,5)}")  # True
print(f"f1 == f2 ? {f1 == f2}")  # False
print(f"f1 != f2 ? {f1 != f2}")  # True
print(f"f1 < f2 ? {f1 < f2}") # True
print(f"f1 <= Fraction(3,5) ? {f1 <= Fraction(3,5)}") # True
print(f"f1 > f3 ? {f1 > f3}") # True
print(f"f1 >= Fraction(1,2) ? {f1 >= Fraction(1,2)}") # True

# Comparisons with integers
print("\nComparaisons avec entiers :")
print(f"f1 == 6 ? {f1 == 6}") 
print(f"f1 < 1 ? {f1 < 1}")
print(f"f1 <= 2 ? {f1 <= 2}") 
print(f"f1 > 0 ? {f1 > 0}")
print(f"f1 >= 2 ? {f1 >= 2}")

# Checking addition and equality
print("\nTest egalite apres addition :")
if f1 + f2 == Fraction(29, 15):
    print(f"{f1} + {f2} = 29/15 (correct)")
```
