MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_isqrt_huge

Method test_isqrt_huge

Lib/test/test_math.py:1132–1138  ·  view source on GitHub ↗
(self, size)

Source from the content-addressed store, hash-verified

1130
1131 @support.bigmemtest(2**32, memuse=0.85)
1132 def test_isqrt_huge(self, size):
1133 if size & 1:
1134 size += 1
1135 v = 1 << size
1136 w = math.isqrt(v)
1137 self.assertEqual(w.bit_length(), size // 2 + 1)
1138 self.assertEqual(w.bit_count(), 1)
1139
1140 def test_lcm(self):
1141 lcm = math.lcm

Callers

nothing calls this directly

Calls 3

bit_countMethod · 0.80
assertEqualMethod · 0.45
bit_lengthMethod · 0.45

Tested by

no test coverage detected