+ 2
Square root implementation
I am trying to implement a square root function implementation. My code seems to work, except that it does not output the answer when I put a very large number as input. Any suggestions? https://code.sololearn.com/cgq8cbxmOqSp/#cpp
2 odpowiedzi
+ 1
I fixed it!
+ 1
Coder Kitten
I changed my code so that the range depends on the function argument. It seems to be imprecise after the second decimal, and it doesn't seem to work for numbers between 0 and 1.
I made this code because I was trying to understand how people who made sqrt() function implemented it. Maybe you know a better way?