How Do You Calculate Square Root?

AI Thread Summary
To create a simple calculator for finding the square root of a number, the method involves using the iterative formula x' = (a/x + x)/2, where 'a' is the input number and 'x' is the current estimate of the square root. This formula is based on the Babylonian method, also known as Heron's method, which improves the estimate with each iteration. The process continues until the estimate converges to a stable value. This approach is efficient and can be easily implemented in a programming environment.
w3tw1lly
Messages
20
Reaction score
0
Just bored and decided I want to make my own little calculator on my computer. What is the method for finding the square root of an input number?
 
Technology news on Phys.org
To find the sqrt of a

x'=(a/x+x)/2

iterate.

Have fun.
 
Thanks, I appreciate it. Sorry it was such a bad question:shy:.
 
Last edited:
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top