
28 Jan
2005
28 Jan
'05
10:38 p.m.
Jason Hise wrote:
Sérgio Vale e Pace wrote:
Also, even when the difference of 1 is arrived at correctly, isn't it reasonable to assume that the lesser of the two numbers is the floor of the square root?
try 4
ahh... alright, I see the problem. So how about I just default X to N instead of 1?
You can start with X=(N-1)/2. This small adjustment came to my mind just after I sent my previous post. It saves you one recursion step.