Infinity is 0x7F800000 which leads to half of infinity = 0x7F800000 / 2 = nan.
Nan is 0x7FC00000, so to validate the result we can simply check if the result is not equal to the result because nan is defined to be different from any number including nan itself.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com