Lines Matching refs:hypot
735 hypot = math.hypot
742 hypot(*args[:i]),
747 self.assertEqual(hypot(12.0, 5.0), 13.0)
748 self.assertEqual(hypot(12, 5), 13)
749 self.assertEqual(hypot(Decimal(12), Decimal(5)), 13)
750 self.assertEqual(hypot(Fraction(12, 32), Fraction(5, 32)), Fraction(13, 32))
751 self.assertEqual(hypot(bool(1), bool(0), bool(1), bool(1)), math.sqrt(3))
754 self.assertEqual(hypot(0.0, 0.0), 0.0) # Max input is zero
755 self.assertEqual(hypot(-10.5), 10.5) # Negative input
756 self.assertEqual(hypot(), 0.0) # Negative input
758 math.copysign(1.0, hypot(-0.0)) # Convert negative zero to positive zero
761 hypot(1.5, 1.5, 0.5),
762 hypot(1.5, 0.5, 1.5),
767 hypot(x=1)
769 hypot(1.1, 'string', 2.2)
772 hypot(1, int_too_big_for_float)
775 self.assertEqual(hypot(INF), INF)
776 self.assertEqual(hypot(0, INF), INF)
777 self.assertEqual(hypot(10, INF), INF)
778 self.assertEqual(hypot(-10, INF), INF)
779 self.assertEqual(hypot(NAN, INF), INF)
780 self.assertEqual(hypot(INF, NAN), INF)
781 self.assertEqual(hypot(NINF, NAN), INF)
782 self.assertEqual(hypot(NAN, NINF), INF)
783 self.assertEqual(hypot(-INF, INF), INF)
784 self.assertEqual(hypot(-INF, -INF), INF)
785 self.assertEqual(hypot(10, -INF), INF)
788 self.assertTrue(math.isnan(hypot(NAN)))
789 self.assertTrue(math.isnan(hypot(0, NAN)))
790 self.assertTrue(math.isnan(hypot(NAN, 10)))
791 self.assertTrue(math.isnan(hypot(10, NAN)))
792 self.assertTrue(math.isnan(hypot(NAN, NAN)))
793 self.assertTrue(math.isnan(hypot(NAN)))
798 self.assertTrue(math.isclose(hypot(*([fourthmax]*n)),
804 self.assertEqual(math.hypot(4*scale, 3*scale), 5*scale)
821 hypot = math.hypot
867 self.assertEqual(hypot(x, y), z)