Here is an algorithm that approximates the inverse and normal square root of a number using floating-point bit manipulation and Newton's method: https://github.com/ErdemT09/Fast-inverse-square-root/blob/master/FastInverseSqrt.java