I am using the class constructor Fraction to create fractions. What is the difference between using the Fraction class constructor and from_float method when creating fractions from floating-point numbers?
I tested it with different numbers and I got same answers. for instance:
from fractions import Fraction
f1 = Fraction(0.3)
f2 = Fraction.from_float(0.3)
print(f1) # Output: 5404319552844595/18014398509481984
print(f2) # Output: 5404319552844595/18014398509481984