Lines Matching refs:ldexp
616 mant, exp = int(math.ldexp(mant, mant_dig)), exp - mant_dig
632 return math.ldexp(tmant, texp)
735 self.assertRaises(TypeError, math.ldexp)
736 self.ftest('ldexp(0,1)', math.ldexp(0,1), 0)
737 self.ftest('ldexp(1,1)', math.ldexp(1,1), 2)
738 self.ftest('ldexp(1,-1)', math.ldexp(1,-1), 0.5)
739 self.ftest('ldexp(-1,1)', math.ldexp(-1,1), -2)
740 self.assertRaises(OverflowError, math.ldexp, 1., 1000000)
741 self.assertRaises(OverflowError, math.ldexp, -1., 1000000)
742 self.assertEqual(math.ldexp(1., -1000000), 0.)
743 self.assertEqual(math.ldexp(-1., -1000000), -0.)
744 self.assertEqual(math.ldexp(INF, 30), INF)
745 self.assertEqual(math.ldexp(NINF, -213), NINF)
746 self.assertTrue(math.isnan(math.ldexp(NAN, 0)))
750 self.assertEqual(math.ldexp(INF, -n), INF)
751 self.assertEqual(math.ldexp(NINF, -n), NINF)
752 self.assertEqual(math.ldexp(1., -n), 0.)
753 self.assertEqual(math.ldexp(-1., -n), -0.)
754 self.assertEqual(math.ldexp(0., -n), 0.)
755 self.assertEqual(math.ldexp(-0., -n), -0.)
756 self.assertTrue(math.isnan(math.ldexp(NAN, -n)))
758 self.assertRaises(OverflowError, math.ldexp, 1., n)
759 self.assertRaises(OverflowError, math.ldexp, -1., n)
760 self.assertEqual(math.ldexp(0., n), 0.)
761 self.assertEqual(math.ldexp(-0., n), -0.)
762 self.assertEqual(math.ldexp(INF, n), INF)
763 self.assertEqual(math.ldexp(NINF, n), NINF)
764 self.assertTrue(math.isnan(math.ldexp(NAN, n)))
812 actual = [math.log2(math.ldexp(1.0, n)) for n in range(-1074, 1024)]