Can anybody tell me or provide code that shows the representation of Infinity in CUDA. I tried to use following code but there is error message that host function can not be called from device .
And just in case you need the float value it is: 0x7f800000;
If you want negative infinity then in both cases change the 7 to a f.
You can figure these values our for yourself if you know that infinity is defined as having an exponent of all 1s and a mantissa of all 0s. The sign bit is still used for +/- infinity.