paper, tips, programming
bool isnan(double x) { if (!(x >= 0) && !(x <=0)) return true; else return false; }
if (std::isnan(kld))
if (isnan(kld))