WHAT THE FU*K

The Fast Inverse Square Root line of code, ‘i = 0x5f3759df – (i >> 1);’, revolutionized graphics processing in the 90s by efficiently calculating 1/sqrt(x) through bit manipulation and approximation. It exemplified creative programming, significantly enhancing game performance and remains a celebrated part of programming lore and hacker culture.

Read More WHAT THE FU*K

How is a floating-point number stored?

The computer allocates 32-bit memory for storing a float value, using IEEE 754 floating point conversion. With a positive value, the sign bit is 0. The integer and fraction are converted to binary, and the biased exponent is calculated and represented in the binary format. The final binary representation is 0 10000100 00001001001110110110010.

Read More How is a floating-point number stored?

Reading Declarations in C

When reading code, follow these points: 1) * – pointer to 2) [] – array of 3) () – function returning 4) Start at the variable name 5) Read right first without crossing parenthesis 6) Then go left without crossing 7) Start inwards and move outwards. Reading is right to left. Examples are provided for different variable types.

Read More Reading Declarations in C