diff --git a/fastsqrt_version2 b/fastsqrt_version2 new file mode 100644 index 0000000..054fb34 --- /dev/null +++ b/fastsqrt_version2 @@ -0,0 +1,5 @@ +float InvSqrt(float x){ + uint32_t i = 0x5F1F1412 - (*(uint32_t*)&x >> 1); + float tmp = *(float*)&i; + return tmp * (1.69000231f - 0.714158168f * x * tmp * tmp); +}