How to generate inf and -inf without warning? Does anybody know that?

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!

math_constants.h has definitions for CUDART_INF and CUDART_INF_F.

Thank you!It is very kind of you.

Two more questions:

    Do I need to include this head file in my .cu file? 

    Does cuda have any introduction to this kind of file?