Lines Matching refs:Fraction
135 from fractions import Fraction
164 (<class 'float'>, Fraction(19, 2), 5)
170 (<class 'float'>, Fraction(1000, 1), 3000)
174 >>> from fractions import Fraction as F
176 (<class 'fractions.Fraction'>, Fraction(63, 20), 4)
181 (<class 'decimal.Decimal'>, Fraction(6963, 10000), 4)
203 total = sum(Fraction(n, d) for d, n in partials.items())
232 ssd = c = Fraction(0)
239 sx = sum(Fraction(n, d) for d, n in sx_partials.items())
240 sxx = sum(Fraction(n, d*d) for d, n in sxx_partials.items())
278 if issubclass(T, Fraction) and issubclass(S, float):
280 if issubclass(T, float) and issubclass(S, Fraction):
293 x is expected to be an int, Fraction, Decimal or float.
309 # largest. For example, Fraction(3.14E+300) + Fraction(3.14E-300),
311 # Fraction(Decimal('3.14E+5000')) + Fraction(Decimal('3.14E-5000'))
336 # This covers the cases where T is Fraction, or where value is
420 >>> from fractions import Fraction as F
422 Fraction(13, 21)
855 >>> from fractions import Fraction as F
857 Fraction(67, 108)
896 >>> from fractions import Fraction as F
898 Fraction(13, 72)