isnan should be std::isnan