/external/python/cpython3/Lib/ |
D | fractions.py | 108 self._numerator, self._denominator = numerator.as_integer_ratio() 179 return cls(*f.as_integer_ratio()) 191 return cls(*dec.as_integer_ratio()) 193 def as_integer_ratio(self): member in Fraction
|
D | statistics.py | 232 return x.as_integer_ratio() 239 return x.as_integer_ratio()
|
D | datetime.py | 690 a, b = other.as_integer_ratio() 718 a, b = other.as_integer_ratio()
|
D | _pydecimal.py | 705 n, d = abs(f).as_integer_ratio() 976 def as_integer_ratio(self): member in Decimal
|
/external/python/cpython2/Lib/test/ |
D | test_float.py | 234 self.assertEqual(f.as_integer_ratio(), ratio) 239 n, d = f.as_integer_ratio() 244 R(*float(0.0).as_integer_ratio())) 246 R(*float(2.5).as_integer_ratio())) 248 R(*float(0.5).as_integer_ratio())) 250 R(*float(2.1).as_integer_ratio())) 252 R(*float(-2.1).as_integer_ratio())) 254 R(*float(-2100.0).as_integer_ratio())) 256 self.assertRaises(OverflowError, float('inf').as_integer_ratio) 257 self.assertRaises(OverflowError, float('-inf').as_integer_ratio) [all …]
|
/external/python/cpython3/Lib/test/ |
D | test_float.py | 258 self.assertEqual(f.as_integer_ratio(), ratio) 263 n, d = f.as_integer_ratio() 268 R(*float(0.0).as_integer_ratio())) 270 R(*float(2.5).as_integer_ratio())) 272 R(*float(0.5).as_integer_ratio())) 274 R(*float(2.1).as_integer_ratio())) 276 R(*float(-2.1).as_integer_ratio())) 278 R(*float(-2100.0).as_integer_ratio())) 280 self.assertRaises(OverflowError, float('inf').as_integer_ratio) 281 self.assertRaises(OverflowError, float('-inf').as_integer_ratio) [all …]
|
D | test_fractions.py | 282 self.assertEqual(F(4, 6).as_integer_ratio(), (2, 3)) 283 self.assertEqual(F(-4, 6).as_integer_ratio(), (-2, 3)) 284 self.assertEqual(F(4, -6).as_integer_ratio(), (-2, 3)) 285 self.assertEqual(F(0, 6).as_integer_ratio(), (0, 1))
|
D | test_decimal.py | 2072 Decimal.as_integer_ratio, Decimal('inf')) 2074 Decimal.as_integer_ratio, Decimal('-inf')) 2076 Decimal.as_integer_ratio, Decimal('-nan')) 2078 Decimal.as_integer_ratio, Decimal('snan123')) 2084 pq = d.as_integer_ratio() 5458 def as_integer_ratio(self): member in CWhitebox.test_internal_use_of_overridden_methods.X 5472 def as_integer_ratio(self): member in CWhitebox.test_internal_use_of_overridden_methods.Z
|
D | test_long.py | 1368 numerator, denominator = value.as_integer_ratio()
|
/external/python/cpython3/Doc/tutorial/ |
D | floatingpoint.rst | 166 :meth:`float.as_integer_ratio` method expresses the value of a float as a 170 >>> x.as_integer_ratio() 293 >>> (0.1).as_integer_ratio()
|
/external/python/cpython3/Doc/library/ |
D | fractions.rst | 101 .. method:: as_integer_ratio()
|
D | decimal.rst | 459 .. method:: as_integer_ratio() 465 >>> Decimal('-3.14').as_integer_ratio()
|
D | stdtypes.rst | 543 .. method:: int.as_integer_ratio() 558 .. method:: float.as_integer_ratio() 726 return hash_fraction(*x.as_integer_ratio())
|
/external/python/cpython2/Lib/ |
D | fractions.py | 182 return cls(*f.as_integer_ratio())
|
D | decimal.py | 690 n, d = abs(f).as_integer_ratio()
|
/external/python/cpython3/Misc/NEWS.d/ |
D | 3.7.0a2.rst | 232 float with a bad as_integer_ratio() method. Patch by Oren Milman.
|
D | 3.6.4rc1.rst | 234 float with a bad as_integer_ratio() method. Patch by Oren Milman.
|
D | 3.6.0a1.rst | 1004 Make use of new Decimal.as_integer_ratio() method in statistics module. 2143 Add Decimal.as_integer_ratio().
|
D | 3.9.0a1.rst | 2223 Add Fraction.as_integer_ratio() to match the corresponding methods in bool,
|
/external/python/cpython3/Doc/whatsnew/ |
D | 3.6.rst | 999 New :meth:`Decimal.as_integer_ratio() <decimal.Decimal.as_integer_ratio>` 1004 >>> Decimal('-3.14').as_integer_ratio()
|
D | 2.6.rst | 1462 the float type now has an :meth:`as_integer_ratio()` method that returns 1466 >>> (2.5) .as_integer_ratio() 1468 >>> (3.1415) .as_integer_ratio() 1470 >>> (1./3) .as_integer_ratio()
|
D | 3.8.rst | 391 now have an :meth:`~int.as_integer_ratio` method like that found in 394 x.as_integer_ratio()`` and have it work across multiple numeric types.
|
/external/python/cpython2/Doc/whatsnew/ |
D | 2.6.rst | 1458 the float type now has an :meth:`as_integer_ratio()` method that returns 1462 >>> (2.5) .as_integer_ratio() 1464 >>> (3.1415) .as_integer_ratio() 1466 >>> (1./3) .as_integer_ratio()
|
/external/python/cpython3/Modules/ |
D | _datetimemodule.c | 142 _Py_IDENTIFIER(as_integer_ratio);
|
/external/python/cpython2/Doc/library/ |
D | stdtypes.rst | 515 .. method:: float.as_integer_ratio()
|