#qnan problem

Hi!

I faced with a problem I couldn’t find any soultion to on the Internet.
After execution of a device function a variable becomes 1.#QNAN.
What is actually this “quiet nan”? What cases doest it emerge in?

The ultimate reference on this would be the IEEE-754 standard (last refreshed in 2008). For a quick introduction, the following article in the Wikipedia looks OK to me: NaN - Wikipedia

What it may be caused by?
I have a lot of calculations in my program where mistake is probably located so I would like to know type of situation where that 1.#qnan0 appears because it’s very difficult to locate the critical code.