How would I find the closest perfect square to a number, without using sqrt?

closesq(10**1000) works just fine :-). I just had to provide hi and disable the C version of bisect.

3 Likes