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
I've not tried this, but I would think
int isnan(double x) { return x != x; } int isinf(double x) { return !isnan(x) && isnan(x - x); }
would work. It feels like there should be a better way for isinf, but that should work.