|
-
May 1st, 2006, 02:54 PM
#6
Re: Manual Square Root Function...??
 Originally Posted by usnsailorjeoff
...COuld someone please explain the logic behind this function? I don't quite understand what the << and >> does???...
This is simple trial-and-error method: try adding various powers of 2 to the test value and check if it is over the target value - then subtract that last value.
>> and << are binary shift operators (right and left).
>>= - shift with assignment, j >>= 1 is the same as j = j >> 1
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio:
FeinWindows - replacement windows manager for Visual Studio, and more...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|