Square root of 3 billion digits. The fraction (…) for the square root of three can be used as an approximation. Despite having a denominator of only 56, it differs from the correct value by less than (approximately ). The rounded value of 1.732 is correct to within 0.01% of the actual value. Archimedes reported , accurate to (six decimal places) and (four decimal places), respectively. It can be expressed as the continued fraction , expanded on the right. It can also be expressed by generalized continued fractions such as which is evaluated at every second term. The following nested square expressions converge to
Fast inverse square root The calculation of is based on the identity Using the approximation of the logarithm above, applied to both and , the above equation gives: Thus, an approximation of is: which is written in the code as The first term above is the magic number from which it can be inferred that . The second term, , is calculated by shifting the bits of one position to the right. With as the inverse square root, . The approximation yielded by the earlier steps can be refined by using a root-finding method, a method that finds the zero of a function. The