use isfinite, isnan, isinf from std::