平方根倒數速算法

#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; /*
相關文章
相關標籤/搜索