Merge pull request #8 from mikusp/master

add isNaN function
fix generating NaN and Infinity floating point values in CUDA code

Previously, these values were showed and included in generated code.
This caused nvcc compilation error when it encountered a NaN(f) or
Inifinity(f) value.