Lines Matching refs:copysign
415 self.assertEqual(math.copysign(1, 42), 1.0)
416 self.assertEqual(math.copysign(0., 42), 0.0)
417 self.assertEqual(math.copysign(1., -42), -1.0)
418 self.assertEqual(math.copysign(3, 0.), 3.0)
419 self.assertEqual(math.copysign(4., -0.), -4.0)
421 self.assertRaises(TypeError, math.copysign)
423 self.assertEqual(math.copysign(1., 0.), 1.)
424 self.assertEqual(math.copysign(1., -0.), -1.)
425 self.assertEqual(math.copysign(INF, 0.), INF)
426 self.assertEqual(math.copysign(INF, -0.), NINF)
427 self.assertEqual(math.copysign(NINF, 0.), INF)
428 self.assertEqual(math.copysign(NINF, -0.), NINF)
430 self.assertEqual(math.copysign(1., INF), 1.)
431 self.assertEqual(math.copysign(1., NINF), -1.)
432 self.assertEqual(math.copysign(INF, INF), INF)
433 self.assertEqual(math.copysign(INF, NINF), NINF)
434 self.assertEqual(math.copysign(NINF, INF), INF)
435 self.assertEqual(math.copysign(NINF, NINF), NINF)
436 self.assertTrue(math.isnan(math.copysign(NAN, 1.)))
437 self.assertTrue(math.isnan(math.copysign(NAN, INF)))
438 self.assertTrue(math.isnan(math.copysign(NAN, NINF)))
439 self.assertTrue(math.isnan(math.copysign(NAN, NAN)))
443 self.assertTrue(math.isinf(math.copysign(INF, NAN)))
445 self.assertEqual(abs(math.copysign(2., NAN)), 2.)
758 math.copysign(1.0, hypot(-0.0)) # Convert negative zero to positive zero
911 math.copysign(1.0, dist((-0.0,), (0.0,)))
914 math.copysign(1.0, dist((0.0,), (-0.0,)))
1535 self.assertEqual(math.copysign(1., math.tanh(-0.)),
1536 math.copysign(1., -0.))
2067 for func in math.atan2, math.copysign, math.remainder:
2088 self.assertEqual(math.copysign(1.0, x), math.copysign(1.0, y))