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.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top