Lines Matching refs:bit_length
912 k = x.bit_length()
929 self.assertEqual((0L).bit_length(), 0)
930 self.assertEqual((1L).bit_length(), 1)
931 self.assertEqual((-1L).bit_length(), 1)
932 self.assertEqual((2L).bit_length(), 2)
933 self.assertEqual((-2L).bit_length(), 2)
936 self.assertEqual((a-1).bit_length(), i)
937 self.assertEqual((1-a).bit_length(), i)
938 self.assertEqual((a).bit_length(), i+1)
939 self.assertEqual((-a).bit_length(), i+1)
940 self.assertEqual((a+1).bit_length(), i+1)
941 self.assertEqual((-a-1).bit_length(), i+1)