[ELI5]: How do calculators find out the square root of a number?

675 views

[ELI5]: How do calculators find out the square root of a number?

In: Mathematics

4 Answers

Anonymous 0 Comments

Numbers in computers are represented using the “significand” made of significant digits and the base two “exponent” which tells how big the number is. For example, 96 is 3 * 32 or 1.5 * 64 and will be stored as 1.5*2^6 with 1.5 as significand and 6 as exponent.

Square root of 96 is then computed as the square root of 1.5 (as read from a table in memory or with a simple approximation algorithm) multiplied by the square root of 2^6 which is 2^3 or 8 in decimal.

Edit: the approximation algorithm is far out of reach for an ELI5, there are many variations described here : https://en.wikipedia.org/wiki/Methods_of_computing_square_roots

For an ELI45withaPhD on some computation hacks involving simple functions like square root, you can also read : https://en.wikipedia.org/wiki/Fast_inverse_square_root

You are viewing 1 out of 4 answers, click here to view all answers.