Hong-Phuc Bui
2024-04-21 a748a17c7285910b32617850cb52d9a048bcbd46
1
2
3
4
5
6
7
8
9
10
import sys
 
= float(sys.argv[1])
EPSILON = sys.float_info.epsilon
 
= n
while abs(- n/t) > (EPSILON*t):
    t = (/ t + t) / 2
 
print(f"sqrt({n}) ~= {t}")