Home
last modified time | relevance | path

Searched refs:_exact_ratio (Results 1 – 2 of 2) sorted by relevance

/external/python/cpython3/Lib/test/
Dtest_statistics.py698 self.assertEqual(statistics._exact_ratio(i), (i, 1))
704 self.assertEqual(statistics._exact_ratio(f), (n, 37))
707 self.assertEqual(statistics._exact_ratio(0.125), (1, 8))
708 self.assertEqual(statistics._exact_ratio(1.125), (9, 8))
711 num, den = statistics._exact_ratio(x)
716 _exact_ratio = statistics._exact_ratio
717 self.assertEqual(_exact_ratio(D("0.125")), (1, 8))
718 self.assertEqual(_exact_ratio(D("12.345")), (2469, 200))
719 self.assertEqual(_exact_ratio(D("-1.98")), (-99, 50))
730 ratio = statistics._exact_ratio(x)
[all …]
/external/python/cpython3/Lib/
Dstatistics.py141 n, d = _exact_ratio(start)
147 for n,d in map(_exact_ratio, values):
200 def _exact_ratio(x): function