I\'ve been using isinf, isnan functions on Linux platforms which worked perfectly. But this didn\'t work on OS-X, so I decided to use std::is
isinf
isnan
std::is
You could also use boost for this task:
#include // isnan if( boost::math::isnan( ... ) .... )