Lines Matching refs:bit_length
277 k = x.bit_length()
294 self.assertEqual((0).bit_length(), 0)
295 self.assertEqual((1).bit_length(), 1)
296 self.assertEqual((-1).bit_length(), 1)
297 self.assertEqual((2).bit_length(), 2)
298 self.assertEqual((-2).bit_length(), 2)
301 self.assertEqual((a-1).bit_length(), i)
302 self.assertEqual((1-a).bit_length(), i)
303 self.assertEqual((a).bit_length(), i+1)
304 self.assertEqual((-a).bit_length(), i+1)
305 self.assertEqual((a+1).bit_length(), i+1)
306 self.assertEqual((-a-1).bit_length(), i+1)