The solution | Cypress Semiconductor
You guys got were pretty quick. This algorithm produces the rounded integer square root value..
Given a value y = n the sum would be the sum of the term doubled would be
sum (0, 2, 4, 6 .......2(n-1)) = n^2 -n = (n - 1/2)^2 -1/4
x > (n-1/2)^2
The fact that y = n+1 is too large means
(n-1/2)^2 < x < (n+1/2)^2
So y must be the rounded integer value of the square root of x.
Although slow, it is an easy algorithm to implement. Shifting x left two bits will result in y having an extra bit of resolution. Sqrt(2 *256)/16 = 1.4375
I will be sending -050s to hli and Arther when they send me their contact information.
I can be reached at firstname.lastname@example.org