Horje
fast inverse square root explained Code Example
fast inverse square root explained

    float InvSqrt(float x){
        float xhalf = 0.5f * x;
        int i = *(int*)&x;            // store floating-point bits in integer
        i = 0x5f3759df - (i >> 1);    // initial guess for Newton's method
        x = *(float*)&i;              // convert new bits into float
        x = x*(1.5f - xhalf*x*x);     // One round of Newton's method
        return x;
    }




C

Related
union in c Code Example union in c Code Example
execution time of c program Code Example execution time of c program Code Example
execute maven project in cmd Code Example execute maven project in cmd Code Example
div same line Code Example div same line Code Example
How to change an array in a function in c Code Example How to change an array in a function in c Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12