In brief
Fraction represents rational numbers with a numerator and denominator. For example, Fraction(1, 3) + Fraction(1, 6) produces Fraction(1, 2), without first converting the fractions to approximate decimals.
Useful to know
Fraction represents rational numbers with a numerator and denominator. For example, Fraction(1, 3) + Fraction(1, 6) produces Fraction(1, 2), without first converting the fractions to approximate decimals. [1]
This suits exact ratios and educational calculations. Float input can preserve its binary approximation. If the original fraction is known, provide its integer components or a suitable textual representation.
Sources
For further detail and to check the information: