平方根倒数速算法

#include <stdio.h> #include <stdlib.h> #include <math.h> #define MAGIC_NUMBER 0x5F3759DF /* 平方根倒数速算法 */ static float inv_sqrt(float x) { float x_half = 0.5f * x; //long i = *(long *)&x; /*
相关文章
相关标签/搜索