note
jimbojones
Hi,<p>
I think your problem is in your assumption of the maximum possible value for the square root of numbers in the range of 0 to 1.</p>
I managed to fix your code with one line to handle the 0.5 case, but I'll leave it to you to find it.<p>
<spoiler>
a number between 0 and 1 can be written as 1/x, where x > 1. Then the sqrt(1/x) is sqrt(1)/sqrt(x) = 1/sqrt(x). Now sqrt(x) is < x, so the max value of sqrt(1/x) is 1/x.
</spoiler>
- j<p>
583961
583961