PERFORMANCE Problem Solving in C: Floating Point Bit Manipulation

preview_player
Показать описание
C lets you do some truly wild things... but hey, it works!!

I can solve your programming performance issues!

Follow me on Social Media!
Instagram: @jamezsgames
Stream Schedule:
Monday, Tuesday, Wednesday 6:30 PM EST
#performanceprogramming #cprogramming #embeddedsystems
Рекомендации по теме
Комментарии
Автор

Unlike most tech bros, this guy actually knows what he's talking about.

nileriversoftware
Автор

Took me a while of staring at it, but once I figured out why you like dereferenced then casted a pointer, I was extremely satisfied. A very clever, very C solution :)

saraweber
Автор

I felt so big brain knowing the solution would be the sign bit from IEEE

michaelanderson
Автор

The moment I saw the function name and that if else block, I felt like, jeez dude, just cast the variable, shift the sign bit, OR it, re-cast and return.
Knowing that I haven't coded C in years and right now wouldn't even qualify in a interview for a C developer, this gave me a little moment of good feeling.
May be all hope is not lost for me.

shkhamd
Автор

the evil bit hack like the one used in Q_rsqrt in quake

aperture
Автор

Any particular reason you type out a constant for your bitmask in the first part of the OR and shift left logical in the second? Seems odd to show them in two different ways on the same line. For instance couldn't you replace with another "(1<<31)" to get the same result while making the code clearer?

camjackson
Автор

Can you do a video on floating point/fixed point and how it relates to games? Quake used floating point and was a challenge porting over to fixed point systems.

AChris
Автор

I have a suggestion. For myself personally videos about programming when they show the computer screen like this I cannot see the code on the screen at all really no matter how i jack the resolution up. I think it would be better done in some other way to enlarge the text greatly somehow. Or presented in a similar way that the code was presented in the 'what is a stack' video that you made. I am sorry to suggest extra work but this sort of presentation is really miserable for me to follow.

Just my opinion and thoughts.

AChris
visit shbcf.ru