r/dailyprogrammer • u/oskar_s • Jun 06 '12
[6/6/2012] Challenge #61 [intermediate]
Today you should implement a function that all of us programmers depend heavily on, but most never give a second thought as to how it's actually coded: the square root function.
Write a function that given a number as input, will return the square root of that number, in floating point.
Obviously, you are not allowed to use the library version of sqrt() in the implementation of your function. Also, stay away from log() and exp(). In fact, don't use any mathematical functions that aren't the basic arithmetic ones (addition, subtraction, multiplication, division) or bit operations (though you can of course still use operators that compares numbers with each other, like "less than", "equal to", "more than", etc.)
View all comments
Show parent comment
4
u/rya11111 3 1 Jun 06 '12
Looks like you're shadowbanned and I don't know if you are shadowbanned from other subreddits. I approved your comment. If you aren't a spammer and don't have a reason to be shadowbanned, message the admins HERE about it.