from math import isqrt
def sqrt(n):
d = len(str(isqrt(n)))
a, b = 5 * n, 5
step = 0
while step < 10000:
if a >= b:
a, b = a - b, b + 10
else:
a, b = a * 100, (b // 10) * 100 + b % 10
step += 1
res = str(b)
return f"{res[:d]}.{res[d:]}"
r = sqrt(2)
print(r)
To embed this program on your website, copy the following code and paste it into your website's HTML: