Last week I was talking with a system architect and the possibility of developing your own method to compute the square root of a double / float came up. You can find square root methods in most (never say all) computer programming languages. There might be a situation where you are not able to use it because of limited resources. My advice is to always try to use standard libraries in order to make sure you do not have to spend time developing and testing new methods (do not reinvent the wheel).
My first idea was to mimic in code how humans compute the square root of a positive real number. I did not give the idea more thought. That is; until last night. I have read several approaches but have not looked into the source code for such method. In Java in the Math library you have the sqrt() method. Continue reading “Square Root”