Square root of integers #
This file defines the square root function on integers.
int.sqrt z is the greatest integer
r * r ≤ z. If
z ≤ 0, then
int.sqrt z = 0.
sqrt z is the square root of an integer
z is positive, it returns the largest
r such that
r * r ≤ n. If it is negative, it returns
0. For example,
sqrt (-1) = 0,
sqrt 1 = 1,
sqrt 2 = 1