Searched refs:limit_denominator (Results 1 – 6 of 6) sorted by relevance
/external/python/cpython2/Doc/library/ |
D | fractions.rst | 37 (But see the documentation for the :meth:`limit_denominator` method below.) 108 .. method:: limit_denominator(max_denominator=1000000) 115 >>> Fraction('3.1415926535897932').limit_denominator(1000) 123 >>> Fraction(cos(pi/3)).limit_denominator() 125 >>> Fraction(1.1).limit_denominator()
|
/external/python/cpython3/Doc/library/ |
D | fractions.rst | 37 (But see the documentation for the :meth:`limit_denominator` method below.) 121 .. method:: limit_denominator(max_denominator=1000000) 128 >>> Fraction('3.1415926535897932').limit_denominator(1000) 136 >>> Fraction(cos(pi/3)).limit_denominator() 138 >>> Fraction(1.1).limit_denominator()
|
/external/python/cpython2/Lib/test/ |
D | test_fractions.py | 301 self.assertEqual(rpi.limit_denominator(10000), F(355, 113)) 302 self.assertEqual(-rpi.limit_denominator(10000), F(-355, 113)) 303 self.assertEqual(rpi.limit_denominator(113), F(355, 113)) 304 self.assertEqual(rpi.limit_denominator(112), F(333, 106)) 305 self.assertEqual(F(201, 200).limit_denominator(100), F(1)) 306 self.assertEqual(F(201, 200).limit_denominator(101), F(102, 101)) 307 self.assertEqual(F(0).limit_denominator(10000), F(0)) 311 F(1).limit_denominator, i)
|
/external/python/cpython3/Lib/test/ |
D | test_fractions.py | 302 self.assertEqual(rpi.limit_denominator(10000), F(355, 113)) 303 self.assertEqual(-rpi.limit_denominator(10000), F(-355, 113)) 304 self.assertEqual(rpi.limit_denominator(113), F(355, 113)) 305 self.assertEqual(rpi.limit_denominator(112), F(333, 106)) 306 self.assertEqual(F(201, 200).limit_denominator(100), F(1)) 307 self.assertEqual(F(201, 200).limit_denominator(101), F(102, 101)) 308 self.assertEqual(F(0).limit_denominator(10000), F(0)) 312 F(1).limit_denominator, i)
|
/external/python/cpython2/Lib/ |
D | fractions.py | 206 def limit_denominator(self, max_denominator=1000000): member in Fraction
|
/external/python/cpython3/Lib/ |
D | fractions.py | 219 def limit_denominator(self, max_denominator=1000000): member in Fraction
|