What the fuck?
OwO whats this??
>>56975239
WTF I HATE JOHN CORMACK
>>56975239
inverse square root - i think this is some of the source from quake. This is John Carmacks code.
Carmack didn't write it.
https://en.wikipedia.org/wiki/Fast_inverse_square_root#History_and_investigation
>>56975239
wtf i have c now
>>56975239
I still struggle with thei = * (long *) &y
i is a "long" and y is a "float", but why do you need to do the address/reference casting instead of directly casting float to long?
>>56977627
If they cast the float to long it will give an aproxinate value of the float. Thats not what they want. They want the bits of the float in an int variable.
>>56977661
K k, i really appreciate why the one C book i read had such an emphasis on commenting; the algorithm is clever but is made much harder by the lack of clarity
>>56977691
Why so? The "what thr fuck?" comment helps quite a bit.
>>56977702
It's accurate on a meta-level comment, I'll give it that
>>56977627
read it backwards
get the address of y, cast to a long type address, get the value at that address.
>>56977792
What does that accomplish? What >>56977661 said?
>>56976154
that's why he added that "what the fuck?" comment.
he didn't understand it
>>56977854
yeah, it reads the float as if it was a long