Searched refs:copy_sign (Results 1 – 3 of 3) sorted by relevance
/external/python/cpython2/Lib/test/ |
D | test_decimal.py | 1203 d = Decimal(1).copy_sign(Decimal(-2)) 1205 self.assertEqual(Decimal(1).copy_sign(-2), d) 1206 self.assertRaises(TypeError, Decimal(1).copy_sign, '-2') 1863 d = c.copy_sign(Decimal(1), Decimal(-2)) 1864 self.assertEqual(c.copy_sign(1, -2), d) 1865 self.assertEqual(c.copy_sign(Decimal(1), -2), d) 1866 self.assertEqual(c.copy_sign(1, Decimal(-2)), d) 1867 self.assertRaises(TypeError, c.copy_sign, '1', -2) 1868 self.assertRaises(TypeError, c.copy_sign, 1, '-2')
|
/external/python/cpython2/Lib/ |
D | decimal.py | 2924 def copy_sign(self, other): member in Decimal 3458 return self.copy_sign(other) 4160 def copy_sign(self, a, b): member in Context 4182 return a.copy_sign(b)
|
/external/python/cpython2/Doc/library/ |
D | decimal.rst | 516 .. method:: copy_sign(other) 521 >>> Decimal('2.3').copy_sign(Decimal('-1.5')) 1196 .. method:: copy_sign(x, y)
|