File talk:Invsqrt0-10000.svg
跳转到导航
跳转到搜索
The code of the program used to create the data:
#include <math.h> #include <stdio.h> float InvSqrt (float x) { float xhalf = 0.5f*x; int i = *(int*)&x; i = 0x5f3759df - (i>>1); x = *(float*)&i; return x*(1.5f - xhalf*x*x); } int main() { float f; for( f=0.01f;f<=10000.f;f*=1.01 ) { printf("%f\t%f\t%f\t%f\n", f, InvSqrt(f), 1.f/sqrt(f), -(InvSqrt(f)-1.f/sqrt(f))); } return 0; }
发起有关File:Invsqrt0-10000.svg的讨论
讨论页是人们讨论如何改善Wikimedia Commons上的内容的地方。您可以使用此页面发起有关如何改进File:Invsqrt0-10000.svg的讨论。