Source
- URL: https://x.com/anilcanglk12/status/1687596589450231809
- Author: Anılcan Gülkaya (@anilcanglk12)
- Posted: 2023-08-04 22:49:15
Branch
1/ @anilcanglk12
@mike_acton
0.0000002000108 accurracy with one iteration:
https://shorturl.at/ilpJM
float RSqrt(float x)
{
float f = x;
uint32_t i = (uint32_t)&f;
i = (uint32_t)(0x5F1FFFF9ul - (i >> 1));
f = (float*)&i;
return 0.703952253f * f * (2.38924456f - x * f * f);
}