One square root function for unsigned numbers
Write the function sqrti(x) that from one not negative integer number x, it returns the integer square root of that number truncate to the 0 digit, so the result will be the same of
You may not use as function and operation nothing other than floor and sign function,+-*/ operations on integers or float numbers (the 4 operation sum, difference, multiplication, division). Are allowed all compare and assignment operation on integer and float numbers as =,<,<=,==,!= etc.
Are allowed the loops, all control flow with goto, the if, the case flow control etc.
Are allowed both recursive and iterative functions.
Win the one write one function with right results, and more short.
Example Sqrti(0)-->0 Sqrti(1)-->1 Sqrti(2)-->1 Sqrti(3)-->1 Sqrti(4)-->2 Sqrti(5)-->2 Sqrti(999999999999999)=31622776