Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
155 B
2
Indexable
Never

def sqrt(x):
# x est un entier non signé sur 32 bits
racine=0
bit=1<<15
while (bit!=0):
rb=racine+bit
bit=bit>>1
if (rb*rb <= x):
racine=rb
return racine
Leave a Comment