The Cookout

Random musings, lighthearted communication, and good vibes.

Stats

Category
Entertainment
Total members
15
Total events
0
Total discussions
5K
Total views
1M

The Fast Inverse Square Root

TheHarmattan

*nix Master
Tither
Messages
2,248
Reputation
1,269
Location
Wakanda
zBucks
0
Sex
Male
Race
Black
Origin
USA
Very nice but the <math.h> can tweak this and the optimization would make up for the speed aspect.


View: https://youtu.be/p8u_k2LIZyo



Fast inverse square root, sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5F3759DF, is an algorithm that estimates 1 x {\displaystyle {\frac {1}{\sqrt {x}}}}
{\displaystyle {\frac {1}{\sqrt {x}}}}
, the reciprocal (or multiplicative inverse) of the square root of a 32-bit floating-point number x {\displaystyle x}
x
in IEEE 754 floating-point format. This operation is used in digital signal processing to normalize a vector, i.e., scale it to length 1. For example, computer graphics programs use inverse square roots to compute angles of incidence and reflection for lighting and shading.
 

Blackgravity

On Y0 Six
Community Host
Tither
App Beta Tester
  • Messages
    1,892
    Reputation
    2,557
    Location
    PDX
    zBucks
    0
    Sex
    Male
    Race
    Black
    Origin
    USA
    Very nice but the <math.h> can tweak this and the optimization would make up for the speed aspect.


    View: https://youtu.be/p8u_k2LIZyo



    Fast inverse square root, sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5F3759DF, is an algorithm that estimates 1 x {\displaystyle {\frac {1}{\sqrt {x}}}}
    {\displaystyle {\frac {1}{\sqrt {x}}}}
    , the reciprocal (or multiplicative inverse) of the square root of a 32-bit floating-point number x {\displaystyle x}
    x
    in IEEE 754 floating-point format. This operation is used in digital signal processing to normalize a vector, i.e., scale it to length 1. For example, computer graphics programs use inverse square roots to compute angles of incidence and reflection for lighting and shading.
    You trying to give niggas headaches reading this?
    I know basics but you going too hard for me. Lol good stuff though.