Hello! could someone give me some algorithm in computing the square root of a number without using any loops?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hello! could someone give me some algorithm in computing the square root of a number without using any loops?
yup i already use the sqrt method from the Math class. i am searching rigth now and so far all of my research has a loop in it. Im currently searching on algorithm that i can use without using loop statements. but if you could suggest me some operators that i can use it would help me alot thnk you
First work out how to get the square of a number.
I.E how would you work out the Square of the number 3?
Once you have that, use reverse engineering to get the square root.
Wishes Ada xx
If to Err is human - then programmers are most human of us all.
"The Analytical Engine offers a new, a vast, and a powerful language . . .
for the purposes of mankind."
— Augusta Ada Byron, Lady Lovelace (1851)