When programing in cuda, I have this problem: How to generate inf and -inf without warning?
Now I get it by this way:
double dInf = 1.0 / 0.0; double dNegInf = -1.0 / 0.0; But When complie this kind of code, I will receive "warning: division by zero". Although My code can work well, I still want to know that there is some better way to attain inf and -inf. Does anybody know? Think you!