xqian / cpp_projects

cplusplus projects for myself
2 stars 2 forks source link

sqrt(x) #13

Open xqian opened 11 years ago

xqian commented 11 years ago

http://leetcode.com/onlinejudge#question_69

Reference: https://en.wikipedia.org/wiki/Newton's_method http://fisherlei.blogspot.com/2013/01/leetcode-sqrtx.html

If the machine support float number, I will use float number and newton's method, finding the nearest int for the problem.

waveletus commented 11 years ago

Good idea to try classic problem in github.