Use std::numeric_limits's way of generating silent NaN instead of C function call